Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using OnConnectionStatus()

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

    Using OnConnectionStatus()

    Hi,

    Look forward to putting this very useful function into action.

    But I'm not clear on how it works. I believe I was told before that if connection is lost, the strategy "stops". Does that mean the strategy actually *stops* (as if I hit the 'stop' button) and the code is no longer executing... and if that's the case, what's the OnConnectionStatus call going into?

    Or, does it just mean that the strategy is still loaded and "executing", but none of the events (OnBarUpdate, OnMarketData, etc, etc) are connected/firing?

    #2
    No, when you lose connection it will try to reconnect. The strategy does not stop.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      Wait, I'm completely confused then. I guess it was this other thread that confused me:


      They talked about the strategy being killed after disconnect, and Ray seemed to implicitly confirm that's what happens.

      I already have RealtimeErrorHandling turned onto "do nothing", and try to handle whatever I can. Is *that* the reason the strategy by the previous author might have been killed, because they didn't have that set?

      PS. I subscribed to this thread, so I know there was another post that you deleted. You mention handling "whatever happens"... boy, I'd really like to know what else I need to think about! Do you have a list? Order handling issues, I think I've done the best I can.

      Comment


        #4
        I do not know what is entailed in the other thread, but I already tested disconnects on my end. It does not stop your strategy and will wait for your connection to reconnect. As Ray mentioned though, there are definitely a lot of things involved with a strategy recover and NT7 will introduce some features to help address those.

        I have attached my test reference. Just connect to your data feed, start the strategy, and then use tcpview or any other software to kill your connection. You can then see for yourself the behavior you can expect.

        There is no list for issues you need to consider. All race conditions, all internal order handling rules, all connectivity issues, etc.
        Attached Files
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        578 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X