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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X