Announcement
Collapse
No announcement yet.
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=6652
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment