Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connections break down

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

    Connections break down

    Hello,

    I have a connection problem with my broker. In a first time IB lost the connection, NT detects it and tries to reconnect.
    After several retries (between 5-10 minutes) IB reconnect again but NT seems to be not able to detect it and after the retries configured, it ends disabling the strategy.
    So, the problem starts in IB but NT seems to don’t handle it properly.
    I have detected the same behavior several nights. Is there any way to improve the robustness of NT retries?

    Please, find a piece of the log file (time in GMT +1):

    25/07/2012 5:59:05|1|2|Interactive Brokers: Primary connection=Connected, Price feed=ConnectionLost
    25/07/2012 5:59:05|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection but will keep running.
    25/07/2012 5:59:17|1|2|Interactive Brokers: Primary connection=Connected, Price feed=Connected
    25/07/2012 6:01:01|1|2|Interactive Brokers: Primary connection=Connected, Price feed=ConnectionLost
    25/07/2012 6:01:01|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection but will keep running.
    25/07/2012 6:02:26|1|2|Interactive Brokers: Primary connection=Connected, Price feed=Connected
    25/07/2012 6:26:25|1|2|Interactive Brokers: Primary connection=ConnectionLost, Price feed=ConnectionLost
    25/07/2012 6:26:25|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost order connection but will keep running.
    25/07/2012 6:26:25|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection but will keep running.
    25/07/2012 6:27:24|1|2|Interactive Brokers: Primary connection=Connected, Price feed=Connected
    25/07/2012 6:27:24|1|64|Instrument='HG 09-12' Account='DU111745' Avg price=3,3689072 Quantity=1 Market position=Short
    25/07/2012 6:27:24|1|64|Instrument='SI 09-12' Account='DU111745' Avg price=26,970464 Quantity=1 Market position=Long
    25/07/2012 7:28:10|1|2|Kinetick Real Time: Primary connection=ConnectionLost, Price feed=ConnectionLost
    25/07/2012 7:28:11|1|2|Kinetick Real Time: Primary connection=Connected, Price feed=Connected
    25/07/2012 7:28:11|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection but will keep running.
    25/07/2012 7:28:11|1|2|Kinetick Real Time: Primary connection=ConnectionLost, Price feed=ConnectionLost
    25/07/2012 7:28:11|1|2|Kinetick Real Time: Primary connection=Connected, Price feed=Connected
    25/07/2012 7:28:11|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection but will keep running.
    .
    .
    .
    25/07/2012 7:30:43|1|2|Kinetick Real Time: Primary connection=ConnectionLost, Price feed=ConnectionLost
    25/07/2012 7:30:43|1|2|Kinetick Real Time: Primary connection=Connected, Price feed=Connected
    25/07/2012 7:30:43|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection but will keep running.
    25/07/2012 7:30:43|3|128|Strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261' lost price connection more than 100 times in the past 1 minutes and will be disabled.
    25/07/2012 7:30:43|1|128|Disabling NinjaScript strategy 'PairStrategy/34b3f18d0421464482db42bcfa3f7261'

    Regards

    #2
    Hello jbesada,

    The log information displays you are re-connected after each disconnection you experienced with IB.

    I see strategies are disabled if you experience a disconnection 100 times in one minute. Am I corrrect you experience many disconnections/re-connections during 7:30?

    You could also set Handling to KeepRunning at Control Center-->Tools-->Options-->Strategies-->NinjaScript-tab. Subsequently automated strategies will continue to run during a disconnection. More information can be found at the link below.


    We realize that lost connections can be frustrating. A connection state between NinjaTrader and your broker/market data vendor is not dictated by NinjaTrader. The NinjaTrader application only reports the connection state as it is reported by the API you are connected through. NinjaTrader behaves like a radio receiver in that it receives signals from the connected server. If the signals are not coming through, the underlying broker/market data vendor API reports this to the NinjaTrader application which in turn reports this back to you. Once a loss of connection is reported, NinjaTrader or the underlying API will continuously try to re-establish a connection.
    Common reasons that contribute to connection stability are:
    • ISP issues
    • Hardware firewall changing IP addresses frequently
    • Dynamic IP addresses changing frequently intraday. Usually this happens once a week but you may want to check with your ISP. If they do change daily, requesting a static IP address may help.
    • Broker/market data servers may be experiencing temporary downtime
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi,

      KeepRunning was already active as you can see in the log.

      I agree Broker is losing the connection (I have checked it in broker logs), but Broker is recovering the connection several minutes after but NT doesn’t. I have checked broker logs and connection is running again while NT is trying to reconnect with Broker without success (100 times every minute).


      My broker has answered me that in this time window (05:45 - 06:45 CET) they can shut down server for maintenance several minutes.

      So, to summarize, reconnection between NT and IB API is not working fine in some situations. I have tested it with manual disconnect and reconnection works fine, but in real situation during the night reconnection fails.

      Regards

      Comment


        #4
        Hello jbesada,

        The information you included displays you are re-connected after each IB disconnection. Once you are re-connected to IB at 6:27, you experience disconnections with Kinetick. Can you please send me all logs and trace files. Go to Control Center-->Help-->Mail to Support in NinjaTrader. Put 'Attn Jason, Connections break down' in the subject field and enable 'Log and trace files'.
        JasonNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,604 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        13 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X