Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cbi.Connection

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

    Cbi.Connection

    NT Team,

    The below snippet identifies where the Connection is to Market Replay.
    Code:
    if (Cbi.Connection.PlaybackConnection != null)
     { do something }
    Is there a similar snippet which identifies where the Connection is Live or to Market Replay? Or more simply, where there is any Connection?

    (I am unsure of the behaviour of "Cbi.Connection.ClientConnection")

    #2
    Hello Shansen.

    Thank you for the post.

    You can use OnConnectionStatusUpdate to get all information about your current connection:



    Code:
    private void OnConnectionStatusUpdate(ConnectionStatusEventArgs e)
        	{
    	        /* For multi-threading reasons, work with a copy of the ConnectionStatusEventArgs to prevent situations
    	         where the ConnectionStatusEventArgs may already be ahead of us while in the middle processing it. */
    	        ConnectionStatusEventArgs eCopy = e;
    			
    			Print(eCopy.Connection.Options.Name);
    
    }
    Please let us know if we may be of any further assistance.

    Comment


      #3
      For completeness, what is Cbi.Connection.ClientConnection?

      Comment


        #4
        Hello. Thank you for the reply.

        This item is used internally in NinjaTrader, it is not documented so It is not meant to be used in a script.

        Please let us know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        60 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        39 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        21 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        23 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X