Profile Picture

IB Gateway and RightEdge don't reconnect after the nightly disconnect from Interactive Brokers

Posted By pumpanddump2k 2 Years Ago

IB Gateway and RightEdge don't reconnect after the nightly disconnect...

Message
Posted Thursday December 24 2015
Dear All,

Thank you for reading this. I am currently evaluating the RightEdge platform and so far I'm impresed. I have experience with programming and C# but I'm really new to the platform. After configuring and starting IB Gateway and RightEdge and letting everything run autonomously, I've noticed that RightEdge doesn't reconnect to the Data feed after the connection has been lost due to the nightly server restart by Interactive Brokers. It happen at around 00:45am each night. I'm using IB Gateway build 944.3 and RightEdge Build 54. The output message that I receive is :

Data feed disconnected: Disconnected: IB error/warning! id=-1 1100: Connectivity between IB and Trader Workstation has been lost.

If i stop the data feed and start it again it reconnects however it doesn't do it automatically. Could you please provide some input as to what may be happening. Auto Reconnect on Error is checked under Options -> Live and Retry every X seconds is set to 5.

Kind Regards!
Posted Thursday December 24 2015
Can you enable logging in the settings for the TWS Plugin service in RightEdge, and share the logs from when you see this issue?

Also, you may want to have a look at IB Controller.  It helps keep TWS or IB Gateway connected to IB.  It seems like the problem you're seeing is with RightEdge's connection to IB Gateway, so it may not help, but it's worth a try.

Thanks,
Daniel
Posted Sunday January 03 2016
Hi Daniel. Thank you and Happy New Year! I apologize for my delayed response but have been away on vacation and didn't have access. I've attached here my RightEdgeTWSLog from before. I haven't made any progress since. Indeed, the issue is with RightEdge being disconnected from IB Gateway. Please take a look...

Attachments
Posted Tuesday January 05 2016
If you are using IB for data and for trading, RightEdge will have two connections to TWS.  Currently, logs are only written for the broker connection.  Your logs show that there was a disconnection and successful reconnection for the TWS broker functions.  Unfortunately this doesn't tell us anything about why the data connection did not reconnect.

I've modified the TWS plugin so that now it will also produce logs for the data connection.  There should be a new build with this update out soon, and then you can try again and get the logs for the data disconnection.

Thanks,
Daniel
Posted Tuesday January 05 2016
Hi Daniel, thank you. If you don't mind me asking, when should I expect this new build? I'm currently using the trial version of RightEdge and I believe it expires in 15 days. I would like to get this issue sorted out so that I can test an algorithm I've been developing. Indeed, I'm using the live data stream from IB. I don't believe I've done anything special or my pc configuration is different from standard. I simply installed IB Gateway and installed RightEdge. Anyone who has access to the data stream can do it and see if their results agree with mine. 

Regards.
Posted Tuesday January 12 2016
Hi Daniel, I don't mean to be a pest, but would you be able to share the code for the new TWS plugin so that I can start debugging on my own as well?

Kind Regards.
Posted Tuesday January 12 2016
No problem, sorry for not providing an update before.

Attached is the updated code.

Thanks,
Daniel

Attachments
TWSPlugin.cs (188 views, 83.00 KB)
Posted Tuesday January 19 2016
Hi Daniel, I've been trying to figure out what the problem is for the last few day but still cannot determine what's going on. Here are the log files as produced by the IBPluginWithLogging (the one you uploaded) with logs. I am using IBController as you suggested with IBGateway. I've setup my watchlist folder with the Historical, Broker, and Realtime services pointing to the IBPluginWithLogging. Bar Frequency is set to daily. When I start live data everything seems fine until midnight when IB disconnects to reset the servers and then I cannot reconnect any longer (aka. Data label remains RED in (bottom right corner)). Please advise.

Regards.

Attachments
RightEdgeTWSPluginLog2016-01-18.txt (183 views, 111.00 KB)
RightEdgeTWSPluginLog2016-01-19.txt (134 views, 397 bytes)
Posted Thursday January 21 2016
Thanks for the logs.  I think I've fixed the problem now.  Unfortunately it's in RightEdge itself and not in the TWS Plugin, so I'll need to release a new build of RightEdge for you to be able to get the fix.

I'm working on getting a new build out, but don't have an ETA.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems