• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit on close

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

    Exit on close

    I have noticed that when using an automated strategy and having the strategy exit on close you are unable to change this. I have changed the default setting from 30 to 300 and even 3000 second, but the strategy will always exit at the close. I have even tried the simplest of strategies.

    entry example close > close[1] buy market

    and with no stop or target just let the exit on close, close the trade. Again it always closes when the session break occurs. I trade Forex only and use FXCM. I am unsure if this happens across other asset classes.

    #2
    Hello FXMIKE,

    Thank you for your post.

    If you go to Tools > Options > Trading, do you have 'Auto Close Position' enabled for the instrument the strategy trades? Is the time set for the session close?
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      I checked and I do not have the auto close enabled. Now this brings me to another questions. What's the purpose of having this in the strategy properties box if it must be configured under Tools > Options > Trading, tabs.
      Attached Files

      Comment


        #4
        Hello FXMIKE,

        Thank you for your response.

        I see that you mean not matter what strategy exits at the close even though you want it earlier. Are you running the strategy with Calculate.OnBarClose or in the Strategy Analyzer?
        If so, then the bar's timestamp must be less than or equal to the close minus the exit on close seconds.

        For example, let's say you run a 1 minute chart or backtest. Then the 30 second exit on close would not be valid until the bar's timestamp that was the close of the session. If you use a tick based bar then the timestamp is not determined ahead of time.

        What Period Types and Value are you testing? Example: 1 Minute, 4 Range, 150 Tick, etc.
        What Calculate option are you using? Exmaple: OnBarClose.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          I sure feel stupid now. I was using on bar close and using 15-minute bars, so if I set to close 5 minutes before the close, it's impossible using on bar close when calculating my strategy.

          Thanks for the help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Benjaminf, Today, 02:21 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by grayfrog, 05-24-2020, 09:29 PM
          3 responses
          29 views
          0 likes
          Last Post NinjaTrader_RyanS  
          Started by chrismcdermut, Today, 01:46 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by dpolyakov, Today, 01:13 PM
          3 responses
          14 views
          0 likes
          Last Post dpolyakov  
          Started by tjendra, Today, 12:15 PM
          3 responses
          9 views
          0 likes
          Last Post tjendra
          by tjendra
           
          Working...
          X