Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnConnectionStatus() method

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

    OnConnectionStatus() method

    Appears a review of the first example provided in the online help for the
    OnConnectionStatus() method is required. The method signature stated in the example for OnOrderStatus() will not compile. I found the following signature would compile. An explanation of the methods purpose would be appreciated.

    private
    ConnectionStatus dataFeed = ConnectionStatus.Connected;
    protectedoverridevoid OnOrderStatus(OrderStatusEventArgs e)
    {
    if (dataFeed != ConnectionStatus.Connected)
    {
    // Do something
    }
    }

    #2
    Thanks for pointing this out. Generally OnConnectionStatus would be useful for error handling. For instance, it will allow you to manage things if you got disconnected.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ntbone, Today, 02:30 PM
    0 responses
    3 views
    0 likes
    Last Post ntbone
    by ntbone
     
    Started by tuliomgui, Yesterday, 10:07 PM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Learner Trader, Today, 08:36 AM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by GeorgeW, Today, 03:15 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by timko, Today, 11:55 AM
    4 responses
    10 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X