![]() |
|
|||||||
| Connecting Support for establishing connections to your broker or market data service provider. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2012
Posts: 73
Thanks: 3
Thanked 0 times in 0 posts
|
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 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,324
Thanks: 92
Thanked 354 times in 345 posts
|
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. http://www.ninjatrader.com/support/h...tegies_tab.htm 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:
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2012
Posts: 73
Thanks: 3
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,324
Thanks: 92
Thanked 354 times in 345 posts
|
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'.
Jason
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Code Break | buylosellhi | General Programming | 8 | 09-20-2011 03:02 PM |
| Break Even in OnOrderUpdate | daxtrading | Strategy Development | 2 | 06-20-2011 07:10 AM |
| break out | questforconsistency | Strategy Analyzer | 6 | 10-18-2010 07:46 AM |
| Break out | maninjapan | Strategy Development | 31 | 04-16-2009 12:17 AM |
| Pivot line shifts at day break, not session break?? | billy822 | Charting | 4 | 03-23-2009 10:19 AM |