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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
68 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
38 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
Comment