Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

what happens when connection is lost and comes back

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

    what happens when connection is lost and comes back

    I'm using NT/Continuum for futures and Kinetick for stocks for backtesting data and I'm almost ready to trade with IB. Its been only a few weeks of subscribing to both data, but I noticed a few times Kinetick connection got lost, but came back within 2-5 seconds.

    What happens when a connection gets lost (i) at the data provider side, (ii) at IB side, when I am running a few strategy from the Tools->Strategies on the Control Center (rather than on the chart) ?

    For example, suppose I am trading 5 mins bars. Say after 10:30 am bar, a connection got lost, and then comes back at 10:47am.

    (i) When Would NT then assume that the 10:50 am bar happened after 10:30 am bar and ignores the intermediate 10:35, 10:40, 10:45 bars? Or, does NT assume that 10:35 am, 10:40 am and 10:45 bars happened instantaneously?

    (ii) Suppose, my strategy is using Unmanaged orders. I am using an indicator whose value X ranges from -4, -2, 0, 2, 4, and I use the difference between X[0]-X[1] and place the order using X[0]-X[1] (if X[0]-X[1] > 0, I place buys, else I place sells). In this case, suppose the connection was lost for 17 mins (on 5 min bar strategy) like the example above, would X[0]-X[1] actually be like X[0]-X[4] ?

    (iii) How about the IB connection is lost and NT wanted to send an order. Is that order rejected, or is it sent out whenever the next IB connection is back. Suppose there were 2 NT buy, followed by 2 NT sell, followed by 1 NT buy orders during the time when IB connection was lost - would NT sent 1 buy order when the connection is restored, or will it send 2 buys, 2 sells, 1 buy orders when the connection is restored, or will NT completely ignore the orders when IB was disconnected ?

    (iv) If I plan to use IB to trade, is there a way to check against live positions on IB in my strategy to ensure that correct orders are being sent in the event of a disconnection (for unmanaged strategy), while for backtesting purposes the strategy is coded such that it doesn't check with IB ?
    Last edited by uday12; 02-20-2016, 04:12 PM.

    #2
    Hello uday12,

    Thanks for your post.

    These are all great questions to ask before trading live. Disconnections (connection loss) are a fact of electronic trading and how your Ninjatrader/strategy responds is important to understand. You have options on how to set Ninjatraders response. Please see: http://ninjatrader.com/support/helpG...tegies_tab.htm specifically the section: "Understanding the NinjaScript tab"

    In addition you will also need to review: http://ninjatrader.com/support/helpG...tegies_tab.htm

    Further references: http://ninjatrader.com/support/helpG...tegies_tab.htm

    Here is a short video that will also help understand the various options: https://www.youtube.com/watch?v=US9c...A140D7&index=7

    Prior to trading live you would want to test your settings against a live paper account and force disconnections to happen as this will be the best answer to the multitude of questions that can be generated when thinking of the many different situations.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    31 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, Yesterday, 02:41 AM
    0 responses
    14 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    22 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Working...
    X