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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by giulyko00, Today, 12:03 PM
        0 responses
        2 views
        0 likes
        Last Post giulyko00  
        Started by AttiM, 02-14-2024, 05:20 PM
        12 responses
        213 views
        0 likes
        Last Post DrakeiJosh  
        Started by cre8able, 02-11-2023, 05:43 PM
        3 responses
        238 views
        0 likes
        Last Post rhubear
        by rhubear
         
        Started by frslvr, 04-11-2024, 07:26 AM
        8 responses
        117 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        10 responses
        47 views
        0 likes
        Last Post stafe
        by stafe
         
        Working...
        X