Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position Status after connection failure

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

    Position Status after connection failure

    I'm concerned that in an automated strategy an order could fill during an outage and my strategy would not be aware of the change.

    So I have two questions:

    1) How can I determine my position status after a connection failure?

    2) Assuming that an opening or closing order has filled during a connection failure, how can I determine the parameters of the order (i.e. the number of contracts and the average fill price at least, and ideally the time of the fill) after the connection is restored?

    Thanks for your assistance.

    #2
    Hello cmt_Robert,

    Thank you for your post.

    1. During a disconnect this is not possible. However, you can use OnConnectionStatus() for the different connection statuses, but durign the disconnect there is no way to get the account info: http://www.ninjatrader.com/support/h...tionstatus.htm

    2. Upon re-connect the order will be updated via the API. You will need to use the settings detailed in the following link to determine how the strategy reacts to the disconnect and re-connect: http://www.ninjatrader.com/support/h...tegies_tab.htm

    Comment


      #3
      Thank you Patrick.

      I apologize for not being more clear. I understand that DURING the outage there is nothing that can be done to determine the position. I was intending to ask about what can be done after recovery from an outage to re-orient my strategy while keeping it running.

      Looking at the link you provided, I see that I can select "Recalculate" as a Handling Option on disconnect. The notes on this refer to a strategy having been "stopped". I'd like to clarify if "stopped" is the same as "terminated", as I don't want my strategy to be terminated just because of a transient outage. At the same time, I don't want to have my strategy become confused about its state because of a transient outage either. If the strategy is being "stopped" during the outage and then is automatically "restarted" once the connection has recovered that would be ideal.

      Please advise.

      Comment


        #4
        Hello cmt_Robert,

        Thank you for your response.

        Stopped means the strategy is disabled and Recalculate will not occur. So you will want to work with the Disconnect Delay Seconds to set the time before the strategy disables.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        656 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        371 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X