Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit On Close Fails

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

    Exit On Close Fails

    I am backtesting a strategy in version 7.0.1000.7 with ExitOnClose=true

    You will see from the attached screenshot of the Executions tab, that the exit on close works fine until the Entry on 11-May-2010. This position is not exited, until the strategy backtest terminates on 22-Nov-2011.

    I am using the <use instrument setting> parameter for determining the session template. Using other templates will change the date/time of this final trade, but there is still a premature failure of the strategy because the ExitOnClose stops working.

    Is this a known bug? Is there a workaround?

    thanks
    Attached Files

    #2
    Thanks for reporting in symbol, there's no known issue around the ExitOnClose we're aware of at this time.

    What symbol and timeframe / charttype are you working with here in your backtesting?

    Would you see the same outcome on freshly reloaded historical data?

    Thanks,

    Comment


      #3
      Hi Bertrand

      By setting TraceOrders = true; in the Initialize method, I was able to work out what was going on....

      There was a bug in the strategy code after the position was opened, and this apparently stopped the positions being closed automatically at the end of session. Fixing the strategy code, results in exit on close working as expected.

      thanks

      Comment


        #4
        Thanks for letting us know, glad to hear you could resolve it.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        57 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X