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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        61 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        39 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        21 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        23 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X