Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
FirstTickofBar with Historic data?
Collapse
X
-
FirstTickofBar with Historic data?
I see that FirstTickofBar is accurate to real time, but always returns True on historic data. Is there anyway around this? If not, how to do people accommodate? Wouldn't this mean that you then need to test your code to live data, which is pretty limiting. ThanksTags: None
-
Hello timmbbo,
Thanks for your post.
Historical data consists only of the Open, High, Low, Close and Volume data per bar. The historical data does not contain all of the ticks that created the bar, only the finished bar. When processing historical data the OnBarUpdate() method is called once per bar (regardless of the CalculateOnBarClose setting). FirstTickOfBar will also be true as you have observed because it is true once per bar.
If your code is based on tick processing one option is to test using Market Replay where the data is the same as live, IE: tick by tick processing occurs.
Another option is to recode your strategy by adding a 1 tick data series to your strategy, however this introduces other multi time frame considerations that you would have to evaluate by reviewing the helpguide here: http://ninjatrader.com/support/helpG...nstruments.htm
You may also want to review: http://ninjatrader.com/support/forum...ead.php?t=6652Paul H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Aviram Y, Today, 05:29 AM
|
0 responses
2 views
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
34 views
0 likes
|
Last Post Today, 05:15 AM | ||
Started by cls71, Today, 04:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
216 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
Comment