Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnClose

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

    ExitOnClose

    I can't get this to work on my strategy, I have it set to true in the initialize section, but it just gets ignored. I want to be able to my position and all orders on the close of the day i.e. 15:15. How can I do this?

    Thanks
    Malcolm

    #2
    Hi malcolm,

    A few things you may want to check...
    1. Sync your PC clock...
    You can sync your PC clock by double clicking on the clock in the lower right corner of your desktop. Once you have done that, click on Internet Time tab and then click Update. Your PC clock should now be updated.

    2. Make sure you Session Begins and Ends time include the close when you apply the strategy, or on the Chart you apply it to.

    3. I suggest including a ExitOnCloseSeconds to allow more time to close the order/positions.
    You can do this when applying a strategy, or programatically.
    More info at - http://www.ninjatrader-support.com/H...ml?ExitOnClose
    TimNinjaTrader Customer Service

    Comment


      #3
      Tim, do the session times have to be set in the chart properties?

      Thanks
      Malcolm

      Comment


        #4
        Yes, you would set them in the chart properties. If you are running a strategy from the Strategies tab, there should be UI options for you to set begin/end times.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi Tim,

          I have also been having issues with ExitOnClose. The local session time here in Australia is 4pm to 6am (for fdax). However if I set ExitOnClose to true it always assumes the session ends (and starts) at midnight local time and exits my positions. It also does not exit my positions before 6am when the fdax trading session ends.

          In your previous post you recommended setting the session start and end times when starting the strategy, but those options are not available (that I can see) in the strategy window. They are available in the Strategy Analyser, but not in the strategy window in a chart. They are also not available in the chart properties.

          Is there another way of setting session start and end times? I Have searched the help but haven't found anything.

          Thanks,
          Ian

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          650 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