Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose didnt' triggered onOrderUpdate() on backtest

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

    ExitOnClose didnt' triggered onOrderUpdate() on backtest

    When I manually add a day trade strategy with "ExitOnClose" set to true on a historical chart, it didn't run the triggered the OnOrderUpdate() method when exit on close. This caused wrong calculation of my position that affect the backtest result for next day (due to position still considered open by the strategy).

    Is this expected behavior? Will it happen on live? (It is not such a serious issue for me live because I expect to restart the strategy everyday). However, it is giving wrong performance result in back testing.

    #2
    hongchen2000, is ExitOnClose set to false anywhere in the strategy code?
    AustinNinjaTrader Customer Service

    Comment


      #3
      No. The only place set it is in the strategy UI.

      Comment


        #4
        Can you please post the strategy code here so we can take a look? What session template are you testing the strategy on?
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, Yesterday, 09:41 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        31 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        30 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-25-2026, 09:53 PM
        0 responses
        34 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 03-25-2026, 09:51 PM
        0 responses
        19 views
        0 likes
        Last Post CaptainJack  
        Working...
        X