• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
    https://ninjatrader.com/support/help...atusupdate.htm
    https://ninjatrader.com/support/help...seventargs.htm

    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 Seeker of Alpha, Today, 06:17 PM
        0 responses
        7 views
        0 likes
        Last Post Seeker of Alpha  
        Started by gtheaded, Today, 03:47 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Started by TAJTrades, Today, 03:25 PM
        0 responses
        5 views
        0 likes
        Last Post TAJTrades  
        Started by DTSSTS, Today, 01:26 PM
        0 responses
        8 views
        0 likes
        Last Post DTSSTS
        by DTSSTS
         
        Started by RFrosty, Today, 01:20 PM
        0 responses
        25 views
        0 likes
        Last Post RFrosty
        by RFrosty
         
        Working...
        X