Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        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.
            Multi-Dimensional Managed Trading
            jeronymite
            NinjaTrader Ecosystem Vendor - Mizpah Software

            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 algospoke, Today, 06:40 PM
              0 responses
              9 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              7 views
              0 likes
              Last Post maybeimnotrader  
              Started by quantismo, Today, 05:13 PM
              0 responses
              7 views
              0 likes
              Last Post quantismo  
              Started by AttiM, 02-14-2024, 05:20 PM
              8 responses
              168 views
              0 likes
              Last Post jeronymite  
              Started by cre8able, Today, 04:22 PM
              0 responses
              10 views
              0 likes
              Last Post cre8able  
              Working...
              X