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 Segwin, 05-07-2018, 02:15 PM
                14 responses
                1,788 views
                0 likes
                Last Post aligator  
                Started by Jimmyk, 01-26-2018, 05:19 AM
                6 responses
                837 views
                0 likes
                Last Post emuns
                by emuns
                 
                Started by jxs_xrj, 01-12-2020, 09:49 AM
                6 responses
                3,293 views
                1 like
                Last Post jgualdronc  
                Started by Touch-Ups, Today, 10:36 AM
                0 responses
                12 views
                0 likes
                Last Post Touch-Ups  
                Started by geddyisodin, 04-25-2024, 05:20 AM
                11 responses
                62 views
                0 likes
                Last Post halgo_boulder  
                Working...
                X