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 andrewtrades, Today, 04:57 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        5 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        7 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X