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 DannyP96, 05-18-2026, 02:38 PM
|
1 response
27 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
117 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
69 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
226 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
417 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
Comment