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 Karado58, 11-26-2012, 02:57 PM
                8 responses
                14,828 views
                0 likes
                Last Post Option Whisperer  
                Started by Option Whisperer, Today, 09:05 AM
                0 responses
                1 view
                0 likes
                Last Post Option Whisperer  
                Started by cre8able, Yesterday, 01:16 PM
                3 responses
                11 views
                0 likes
                Last Post cre8able  
                Started by Harry, 05-02-2018, 01:54 PM
                10 responses
                3,204 views
                0 likes
                Last Post tharton3  
                Started by ChartTourist, Today, 08:22 AM
                0 responses
                6 views
                0 likes
                Last Post ChartTourist  
                Working...
                X