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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        72 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        43 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        25 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        28 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        59 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X