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?

    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.

        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 bmartz, 03-12-2024, 06:12 AM
          5 responses
          32 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          13 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by cls71, Today, 04:45 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X