Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Disconnect behavior explanation

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

    Disconnect behavior explanation

    I am just starting out with NT. If and when I develop my strat effectively I will purchase.

    I am using NT with IB TWS and have a question about connectivity/re-connectivity

    When TWS' connection to their servers is dropped, I see that it tries to reconnect.

    When a reconnection is made, is the strategy reloaded?
    How can we detect via code if a connection has been dropped?


    Is there a tutorial/best practices guide on error handling with strategies ?

    #2
    clam61,

    When you lose connection your strategy will be halted and if you regain connection the strategy is still halted. You can handle such scenarios through the use of OnConnectionStatus() method.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      When you lose connection your strategy will be halted and if you regain connection the strategy is still halted
      how do i then unhalt it?

      there seems to be two types of connection problems. one where TWS gets disconnected from the IB servers and one where TWS disconnects from NT.

      does OnConnectionStatus handle both of these situations?

      Comment


        #4
        NinjaTrader does not monitor TWS. When NT loses a connection it will report it. There is no halting/restarting your strategy. If a strategy is terminated it is terminated. If you are trying to code it so it doesn't terminate on order error your strategy never "halted". Please see the reference sample section of the forums for the sample on halting a strategy.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          could you reword this:

          If you are trying to code it so it doesn't terminate on order error your strategy never "halted".

          i dont understand what you mean

          Comment


            #6
            i am now so confused. in this other thread:



            you said

            No, when you lose connection it will try to reconnect. The strategy does not stop.

            Comment


              #7
              clam61, I didn't read all, but I guess this was in connection with RealtimeErrorHandling set to 'TakeNoAction' - http://www.ninjatrader-support.com/H...rHandling.html

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              558 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X