Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Realtime and Connection Status

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

    Realtime and Connection Status

    I haven't verified this yet...but it seems that State=Realtime is executed when there is no connection yet (i.e. when startup has do defined auto connect)

    Is this true?

    And then, besides OnConnectionStatusUpdate(), is there another way to know (i.e. ninja global bool) if there is an active connection?\

    thx

    #2
    Hello llanqui,

    Thank you for your post.

    The strategy will move to go to State.Realtime after State.Historical, however, if there is no live data connection there will be no live data to process.

    I am not aware of another way or global bool that would indicate if there is a live data connection, OnConnectionStatusUpdate() is the documented way to get updates for connection status changes.

    Please let us know if you have any further questions.

    Comment


      #3
      Ok, that is what it seems....when RealTime is entered I cannot expect a connection to be valid

      Comment


        #4
        well, it seems there is a very simple way to do this

        if (Connection.Connections.Count() > 0)

        Comment

        Latest Posts

        Collapse

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