NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 01-20-2009, 08:40 AM   #1
ChiTrader2000
Senior Member
 
Join Date: Nov 2008
Posts: 160
Thanks: 0
Thanked 0 times in 0 posts
Default How to know in BarUpdate() or other event that code is called at end of backtest?

Hello,

Is it possible in the OnBarUpdate() event or other event to determine if the code is being called at the end of the backtest? For instance, in TradeStation there is something like "IsLastBar" or "OnLastBar".

Thanks in advance!

ChiTrader2000
ChiTrader2000 is offline  
Reply With Quote
Old 01-20-2009, 08:48 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

No. You can however just figure out the timestamp of the last bar via a chart and create a condition that checks timestamps if there is some need for this.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing User Choice for Backtest DialogBox Time frame: To & From in Strategy Code? ChiTrader2000 Strategy Development 10 06-06-2009 09:11 AM
ExitOnClose at end of backtest zark.be Strategy Analyzer 7 01-07-2009 03:23 AM
I place an order during a BarUpdate() event but it shows up on the next bar tradefaz General Programming 3 08-24-2008 11:09 PM
Catch the end of a minute bar on a tick by tick OnBarUpdate event Fabrice Automated Trading 5 07-06-2007 12:28 PM
Catch the end of a minute bar on a tick by tick OnBarUpdate event Fabrice Automated Trading 1 07-06-2007 06:53 AM


All times are GMT -6. The time now is 08:55 PM.