Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to make back-test trade happen at bar close?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X