Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy fills next bar instead of intrabar
Collapse
X
-
Strategy fills next bar instead of intrabar
When I run my strategy in real time it fills entry orders intrabar but when I backtest using strategy analyzer or in simulated mode the same strategy fills next bar. How do I correct this? I want it to fill intrabar in all situations.Tags: None
-
Just discovered this....... https://ninjatrader.com/support/help...?calculate.htm
Notes:
1.On a historical data set, only the OHLCVT of the bar is known and not each tick that made up the bar. As a result, State.Historical data processes OnBarUpdate() only on the close of each historical bar even if this property is set to OnEachTick or OnPriceChange. You can use TickReplay or a Multi-time frame script to obtain intrabar data.
2.When set to Calculate OnPriceChange, the OnBarUpdate() method is ONLY called when the price has changed intrabar OR when the bar has closed
This leads to my next question: Since the backtest is only based on the close of each historical bar, is it correct that when you use calculate on bar close that the live strategy will only fill the order on the open of the next bar as opposed to intrabar? Since there is no way to backtest other than replay I would feel more confidant in the results using on bar close.
-
-
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
47 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
23 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
33 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment