• 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??

    Hello,

    Despite having the following code in my strategy, it is exiting on close? What can explain this? I am running a backtest on NT7. Thanks,

    Code:
            protected override void Initialize()
            {
                CalculateOnBarClose = true;
                ExitOnClose = false;
                EntriesPerDirection = 10;
                EntryHandling = EntryHandling.UniqueEntries;
           }
    Attached Files
    Last edited by eleven; 10-20-2016, 11:53 PM.

    #2
    Hello Eleven,

    Thank you for your note.

    Exit on close applies to open positions at the end of the day, what you are seeing in this case is your position closed due to being the last bar of data. The backtest will close any open position at the end of the period for its calculations.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Alan for your clarification. That makes sense.

      eleven

      Comment


        #4
        Exit on close??

        Interesting. I am running NT 7 in real-time with no orders in any state. I set ExitOnClose = false in my strategy and still ExitOnClose actions are performed. Why?

        Thanks.

        Comment


          #5
          Hello jeronymite,

          Thank you for your note.

          Could you please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and attach the strategy which you can find in My Documents>NinjaTrader8>Bin>Custom>Strategy.

          I look forward to your email.
          Alan P.NinjaTrader Customer Service

          Comment


            #6
            Exit on close??

            Thanks for your response, Alan.

            My strategy is 80,000+ lines of code and commercial IP, so it's not really possible to send it.

            However, the matter is simple. My UI has a CheckBox that sets ExitOnClose to true or false. Even when set to false, ExitOnClose processing occurs.

            Grateful for your further assistance.

            Thanks.

            Comment


              #7
              Hello jeronymite,

              Thank you for writing in.

              Could you please send an email to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and attach the log and trace files for the day in subject which you can find in My Documents>NinjaTrader7>Log and My Documents>NinjaTrader7/Trace folders.

              In the email please also provide the exact date and time the exit on close logic was ran.

              I look forward to your email.
              Alan P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Leeroy_Jenkins, Today, 06:54 AM
              0 responses
              1 view
              0 likes
              Last Post Leeroy_Jenkins  
              Started by rainbow47, Today, 06:10 AM
              0 responses
              7 views
              0 likes
              Last Post rainbow47  
              Started by stenberg98, Today, 04:53 AM
              2 responses
              7 views
              0 likes
              Last Post NinjaTrader_Marco  
              Started by wukefuha, Today, 03:20 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Marco  
              Started by mbcmbc, Yesterday, 10:12 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_ChrisSch  
              Working...
              X