Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Non-flat strategy position after exit on close

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

    Non-flat strategy position after exit on close

    I have several strategies (both live and simulated) that run in regular trading hours. Most of my strategies are exiting at close, and they normally do that properly in my IB account. What I noticed however, is that if I get disconnected after the market close e.g. IB shuts down and I reconnect, or I disable the strategy to check/adjust something and then turn it back, I will see a non-flat strategy position associated with my strategy now. It should be flat, as the rule was to exit at the end of trading.

    How can I force a flat strategy position, or what settings do I need to change to make sure the strategy position persists during disconnects?

    #2
    mic414, this is one of the limitations unfortunately working of the default ExitOnClose orders, as you reload the bars would be processed as historical backtest data and thus the last bar of the day still open, as no open tick for a new bar would be seen yet. In realtime the PC clock would be used as reference to submit those orders in, so there's a difference in handling. You could workaround that be implementing a custom time exit for example on a bar before the session end that would historically then trigger as well as you would expect. This generally is an item we have on the list to further improve for our next major platform update.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand. I'll try the custom exit solution, that would be a good workaround for now, thanks for the tip.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by helpwanted, Today, 03:06 AM
      1 response
      12 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      9 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      387 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X