Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Recovering from a disconnect

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

    Recovering from a disconnect

    I was running an automated strategy and when I came back to look at it later I noticed it didn't make the trades it should have made. I then checked the logs and saw that at some point in time it lost it's connection with ZenFire and eventually reconnected. However, this stopped the strategy. How can I automatically reconnect, or have the strategy resume up reconnecting? I see I can monitor the connection status with OnConnectionStatus() but I'm not sure how to recover from a disconnect.


    #2
    shodson, on a connection loss the strategy would be halted and would resume when the connection is reestablished, but this implies you make sure the strategy vs account position are still in proper sync. Unfortunately you can't manually start / stop a strategy from within NinjaScript.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    63 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    35 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    54 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    48 views
    0 likes
    Last Post CarlTrading  
    Working...
    X