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 KonAdams, Today, 10:53 PM
|
0 responses
0 views
0 likes
|
Last Post
by KonAdams
Today, 10:53 PM
|
||
Started by JGriff5646, Today, 10:02 PM
|
0 responses
9 views
0 likes
|
Last Post
by JGriff5646
Today, 10:02 PM
|
||
Started by AdamDJ8, Today, 09:18 PM
|
0 responses
5 views
0 likes
|
Last Post
by AdamDJ8
Today, 09:18 PM
|
||
Started by knowmad, Today, 03:52 AM
|
2 responses
33 views
0 likes
|
Last Post
by knowmad
Today, 09:03 PM
|
||
Started by ETFVoyageur, Today, 07:05 PM
|
0 responses
11 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:05 PM
|
Comment