Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Is it possible to make back-test trade happen at bar close?
Collapse
X
-
Is it possible to make back-test trade happen at bar close?
When running strategy backtesting on daily bars, NinjaScript is executed at bar close, and if a market order is placed by strategy, trade happens at open price of next bar. Is there any way to make trade happen at close price of this bar? Tradestation EasyLanguage supports this feature. I am not sure if NinjaTrader supports this....
Thanks.Tags: None
-
bourbonnais, correct per default that would be NT's expected behavior here, as we treat backtesting more conservatively, as we believe you can't trade on the bar that just closed >> timing wise you are already on the next bar, which is reflected by our backtester trading on the open then.
To simulate your condition you could though add intraday data to the daily bars strategy and execute for example a few mins before the close on this added series.
You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
86 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|
Comment