Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose + Unmanaged Approach

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

    ExitOnClose + Unmanaged Approach

    Will setting:

    ExitOnClose = true;
    ExitOnCloseSeconds = 2715;

    Work programmatically in an unmanaged strategy environment? When optimizing, one is not given the option to specify when to exit on close, and it's important that I force the value within the code to enforce certain time constraints.

    Kind Regards,
    CG

    #2
    I just ran quick test in my unmanaged strategy here and ExitOnClose set programmatically worked as expected.

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      I just ran quick test in my unmanaged strategy here and ExitOnClose set programmatically worked as expected.
      yes, seems to work fine that way.

      On a side note, perhaps you can pass on to the programmers the suggestion to add the option to specify "seconds before close" to backtesting/optimization menu, so that this doesn't have to be set programmatically.

      Comment


        #4
        Thanks, yes I don't see it on my end either listed, will pass it on.

        Comment


          #5
          To add & clarify: the ExitOnCloseSeconds would be for realtime use only, not for backtesting - this will be added to our docs.

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            To add & clarify: the ExitOnCloseSeconds would be for realtime use only, not for backtesting - this will be added to our docs.
            Hmm, very interesting - so are you saying that in backtesting, there is no way to force the close of an instrument any number of seconds before the actual instrument's close?

            what prices are used then in the determination of "the close" - the last traded price?

            Comment


              #7
              Correct, this will then depend on the underlying session template used - or you need custom code an exit on a custom time.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              599 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              344 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              558 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              557 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X