Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose doesnt work correctly.

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

    ExitOnClose doesnt work correctly.

    Hi,

    I have strategy running on multiple instruments: FDAX, 6A, 6E, 6C, 6S and 6J.

    For all of them ExitOnClose is True.

    For FDAX it worked and exited on 20:59 CET
    For 6A, 6J, 6C it closed on 21:59 CET


    I'm not sure if thats the correct timing for them to close? I thought all futures close at 23:00 CET, so exists should have happened on 22:59 CET?

    But for 6E exit didnt work at all, it carried position overnight. What could be the problem here?

    #2
    svlad1983, the ExitOnClose time used is tied to the session template used on your charts / strategies.

    Those times could be reviewed / changed under Tools > Session Manager.

    If you send us your logs via Help > Mail to Support we can review them for the 6E anomaly seen.

    Thanks,

    Comment


      #3
      Hi Bertrand,

      yes I realize that and I left everything by default and I assumed that default values would be correct, and they seem to be correct if I check Instrument settings. But still somehow it doesnt work right.

      Regarding 6E - just mailed you logs.

      Thanks for the support!

      Comment


        #4
        Thanks, will take a look at your files shortly - are you on latest NT7 R6? Would you see those exit times historically as well?

        Comment


          #5
          Yes I have the latest Ninja installed and on backtest I get correct exits, also for 6E.

          Comment


            #6
            Ok, I would then suggest as next steps:

            a) check your local set DateTime and ensure those are synched up via the Windows time sync option

            b) check for Windows Updates and ensure the latest .NET Service and / or patches are installed.

            Comment


              #7
              Thanks Bertrand I will do that.
              I guess Matthew is investigating the problem with 6E.

              Comment


                #8
                Could you update us on this

                Originally posted by svlad1983 View Post
                Thanks Bertrand I will do that.
                I guess Matthew is investigating the problem with 6E.
                Greetings,
                Could you update us on this?

                Is it safe to rely upon the standard ExitOnClose functionality in multi-instrument strategies?

                Comment


                  #9
                  Hello alex.nt,

                  There are situations to consider with the ExitOnClose,

                  "Exit on close" orders might have null references for the execution.Order property. Usually if you add OnOrderUpdate() method (even if it is blank) it will not be null though.

                  Also, if you are using any settings that terminate positions/orders at the end of the session (TIF=Day or ExitOnClose=true), you should NOT submit orders on the last bar of the session. This is for backtesting or using CalculateOnBarClose = true. In real-time with COBC=false, you can still submit orders on the last bar to have it filled prior to close.

                  Last, ExitOnClose requires a tick of data for the order to process. If the session closes and there is no incoming data the close order will not be transmitted.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  651 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  370 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  109 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  574 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  577 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X