Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"Flatten All" vs "Exit on Close"

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

    "Flatten All" vs "Exit on Close"

    I am running a strategy on multiple stocks that takes trades during the day and I use the "flatten all" to exit all positions and disable all strategies at 12:55pm. I initially was using "exit on close" at that time but my strategy was re-entering trades after 12:55 and I would end up with open positions after market close. My problem is that when I re-start my strategy every morning some of the strategies will be "yellow" and will not execute when there is an entry signal. I think its because I still have open "historical" positions. Is this because I am using "flatten all" ?. If so can you explain the underlying logic of whats going on?

    Thanks

    #2
    dtf139, I would expect that - if you did not exit historical position from the prior day the strategy would still wait in the morning for those to be exited by your rules before trading a new live entry (provided you use WaitUntilFlat as mode for starting them up). I would use the ExitOnClose and include a custom time filter in the script that would not allow for any entries after your 12:55pm.

    Comment


      #3
      Thanks Bertrand,

      Instead of ExitOnClose I added a time exit to my strategy that exits the position 10 minutes before the close and that seems to be working perfectly since I implemented it.
      I also am still using "flatten all" about 2 minutes before market close. My thinking is that if for some reason my strategy crashes and I am left with an open position the "flatten all" will protect me. Is that an accurate assumption?

      Comment


        #4
        Thanks for the feedback, glad to hear. Correct FlattenAll would still work on the account level then.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        23 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        115 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        222 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        406 views
        0 likes
        Last Post CaptainJack  
        Working...
        X