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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        51 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        275 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X