Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ExitOnCloseSeconds - ExitOnClose

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

    ExitOnCloseSeconds - ExitOnClose

    Hello Folks,

    I'm using following methods in my automated strategy :
    Code:
    ExitOnClose = true;
    ExitOnCloseSeconds = 30;
    With the session template: <Use Instrument Settings>

    This should close open positions at the end of the trading day.
    It works all fine in the backtest, but if I test it in real on the simAccount it won't exit ...
    What did I miss?

    Thanks and best regards
    Last edited by fernlicht; 03-12-2013, 05:57 AM.

    #2
    Can you clarify what instrument you're using? What are the instrument settings session template?

    What time frame are you backtesting on?

    Do you run the strategy as CalculateOnBarClose= true/false?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Yes, I'm using "CalculateOnBarClose= true" on Tick150 FDAX with default instrument settings or S&P Stocks.

      Comment


        #4
        If it was COBC True, there may not have been an event 30 seconds before the close which would send this order.

        I'd suggest increasing the ExitOnCloseSeconds to ensure that there is enough time for a close of a bar to trigger the exit on close function.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Ok I'll try..

          Comment


            #6
            So, it switched COBC (calculate on bar close) to false....
            and gave it some more time
            but after the close of the market, the strategy hold 1 position and also orders....

            so what could be the problem ?

            Comment


              #7
              What are the exact hours of the session template you're using and what time do you expect the exitonclose to fire?
              MatthewNinjaTrader Product Management

              Comment


                #8
                Ok, i've tested it and it seems, that if i use

                ExitOnCloseSeconds = 200there is plenty of time for the strategy (if market is moving) to open a new position and hold it overnight... so i had to rewrite the strategy and make sure that no new positions are allowed
                after this command/time....

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by AaronKoRn, Yesterday, 09:49 PM
                0 responses
                11 views
                0 likes
                Last Post AaronKoRn  
                Started by carnitron, Yesterday, 08:42 PM
                0 responses
                10 views
                0 likes
                Last Post carnitron  
                Started by strategist007, Yesterday, 07:51 PM
                0 responses
                12 views
                0 likes
                Last Post strategist007  
                Started by StockTrader88, 03-06-2021, 08:58 AM
                44 responses
                3,982 views
                3 likes
                Last Post jhudas88  
                Started by rbeckmann05, Yesterday, 06:48 PM
                0 responses
                10 views
                0 likes
                Last Post rbeckmann05  
                Working...
                X