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 NullPointStrategies, Today, 05:17 AM
|
0 responses
51 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
127 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment