Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What Happens When A Connection Is Lost

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

    What Happens When A Connection Is Lost

    Hi:
    I am concerned about the following scenario & would like to understand NT's thoughts on this.

    1/ I am running a strategy via NinjaScript with an active trade in play with a trailing stop / profit targets orders in place at the exchange.
    2/ Computer locks up & have to reboot.
    3/ Re-open NT & have to re-activate the strategy - do I assume here that I have to include historical data in the strategy to resynchronise with the exchange).
    4/ Strategy has to be active due to exit criteria (indicators) & trailing stop orders.
    5/ Process steps for getting synchonised ???? ---- 1/ open NT, 2/ connect to e-signal (for historical data), 3/ activate strategy, 4/ connect to the broker.

    Also in an alternative scenario where there is a temporary loss in connection (either directly to the internet or datafeed from the broker) & the systems automatically resynchronises ---- could this create any issues with order flow???

    thx in advance
    David

    #2
    a) strategy is canceled as you disconnect
    b) you are left with an active order/position in your account which is no different than just a regular strategy start with an active order/position in your account
    c) temporary loss of connection will not make a difference for your live order/position. However strategy might have missed live bars and you might have to take action by custom code (supported by monitoring the connection status event in NT6.5) or manual action

    Comment


      #3
      thx.
      But regarding point 'b'. yes i am left with an active order......however, with a trailing stop strategy or with an exit based on specific indicator criteria surely there would be need to be some way of resynchronising otherwise the only exit condition could be the 'old' trailing stop level or the profit target.

      thx for your help
      David

      Comment


        #4
        You would need to manually cancel the order and start again. There is no syncing to orders already in place.

        Comment


          #5
          thx for the clarification !

          Comment


            #6
            Connction Loss

            Hi
            I trade emini s&p on globex with datafeed zenfire. If I am in a trade with a stop loss and profit target (oco) in place and I loose connection will my orders be actioned if the relevant price is hit while I am offline
            Also if in a trade can I log off happy in the knowledge my stop profit target if hit will be actioned
            Thanks
            Sam

            Comment


              #7
              - orders on ZenFire accounts reside at the ZenFire server even as you disconnect
              - however, OCO logic is simulated by NT locally, meaning your stop will not cancel your target as it's hit while you are disconnected.

              Comment


                #8
                ConnectionStatus when connected to DataFeed & BrokerFeed

                When running a Ninjascript strategy, and connected to a datafeed and a brokerfeed, e.g. ESIGNAL for data and PATSYSTEMS for trading account,
                which connection is monitored via OnConnectionStatus() ?

                I find that eSignal is very reliable, whereas I have quite a bit of trouble with PATSYSTEMS.

                saltminer

                Comment


                  #9
                  I believe it would be the connection associated to the account that is traded which would be Patsystems, if I am incorrect I will post a correction.
                  RayNinjaTrader Customer Service

                  Comment


                    #10
                    >> which connection is monitored via OnConnectionStatus()
                    The connection where the account is on.

                    Comment


                      #11
                      Hi,

                      Just to quickly revive this thread here... I thought OnConnectionStatus gave us two parameters, one for "price" (Barchart?) and one for orders. Doesn't that mean we can monitor both connections?

                      Or is this a feature introduced in a later release than what was discussed previously?

                      Comment


                        #12
                        >> Doesn't that mean we can monitor both connections?
                        Correct. The account connection has an internal order connection and an internal price connection (which might be different dependent on broker).

                        Comment


                          #13
                          I use Zenfire
                          I use the code SetStopLoss and SetProfitTarget within a strategy.
                          I then get long and then I lose connection and switch off my computer

                          Then for example the SetStoploss gets triggered...


                          Will the SetProfitTarget order continue to be active?
                          Basically once my strategy is running are those code strings on my PC needed or are my strategy generated orders set on Zenfire Server?

                          Comment


                            #14
                            Hello,

                            Since One Cancels the other or OCO order is simulated on your PC when using the zenfire connection your PC would have to be connected to receive confirmation of the fill of your stop to then cancel your profit target. Please see the below link for more information on where my orders reside:

                            Where do orders reside:
                            Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the
                            BrettNinjaTrader Product Management

                            Comment


                              #15
                              Now i am testing my strategy using NT+Zenfire Demo...

                              All my orders are LIMIT buy/sell's with with associated atm puting SL and TP. Today i had connetction Lost for maybe 10 minutes. Than order for 6J and CL where cancelled, order for 6E, 6B, GC stayed active.

                              can you explain this plz?
                              Last edited by DenNYC_; 01-12-2011, 12:09 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              666 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              377 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              110 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              575 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              580 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X