Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit on close

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

    Exit on close

    Hey guys,

    I'm making a daily strategy that is supposed to exit on the close of trade for the day, I have ExitOnClose = true in my Initialize() method but it doesn't seem to be doing it, does ExitOnClose only work on intra-day strategies?

    How would I exit on the close on a daily strategy/chart?

    Thanks!

    #2
    Hello Jumper,

    Thank you for your post.

    You would not be able to use ExitOnClose for daily data as it would not be able to determine the end of the session this way through the data.
    You would need to use an intraday bar for this to work.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Okay, so using intra-day data, how can I exit on the close of the next bar? Can't seem to use Close[0] like so, as it can't convert to a bool.

      if (Close[0])
      {
      ExitLong();
      }
      Last edited by Jumper; 08-23-2014, 10:40 PM.

      Comment


        #4
        Hello Jumper,

        Thank you for your response.

        So you want the entry on the same bar as the close, correct? Meaning you are entering on a daily bar and want to close when that bar closes? Are you connecting to an EOD (End Of Day) only data feed, such as Kinetick EOD?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X