Posted 3/2/2010 14:18:36
|
|
|
|
Twice in the last month I had issue which I saw double orders for my positions in TWS.
I investigated this and found in the output window the following message:
Broker disconnected: Disconnected: Error! id=-1 errorCode=1100Connectivity between IB and TWS has been lost
right after that, at the same second, I have a "Broker reconnected" message.
However, it seems that this short disconnection was enough for RE to lose it's synchronization with the open orders in IB, which resulted in these orders not being canceled at the end of the bar before new orders were resubmitted, hence the cause for the double orders.
Do you have any idea of how to avoid this situation?
|
|
Posted 3/3/2010 13:01:18
|
|
|
|
I would subscribe to ConnectionStateChanged and in a disconnect state, you may want to shut the system down until you can sort it out. I don't know what we can do to prevent connection blips like that. We're working on some items that may help connection breaks.
lksf (3/2/2010) Twice in the last month I had issue which I saw double orders for my positions in TWS.
I investigated this and found in the output window the following message:
Broker disconnected: Disconnected: Error! id=-1 errorCode=1100Connectivity between IB and TWS has been lost
right after that, at the same second, I have a "Broker reconnected" message.
However, it seems that this short disconnection was enough for RE to lose it's synchronization with the open orders in IB, which resulted in these orders not being canceled at the end of the bar before new orders were resubmitted, hence the cause for the double orders.
Do you have any idea of how to avoid this situation?
|
|
Posted 3/8/2010 00:50:06
|
|
|
|
| Could you resync with IB orders?
|
|
Posted 3/8/2010 09:03:20
|
|
|
|
We don't have any ability to query what's currently open in IB at this time. It is something we plan on adding.
lksf (3/8/2010) Could you resync with IB orders?
|
|
Posted 7/14/2010 03:48:44
|
|
|
|
| I've exactly same problem. It would be great to have ability to ask IB for open orders!
|
|
Posted 7/15/2010 13:13:17
|
|
|
|
are you at RE aware of this C# open source for the IB api? It might help speed things up for you.
BTW, this is an important issue, and one few platforms handle well.
http://www.dinosaurtech.com/utilities/
Interactive Brokers provides a great API for programmatic trading, but they do not offer a native C# version. I have ported their java socket interface to C#, and am maintaining it as IB introduces new features. I have also incorporated inline documentation into the library for reference purposes.
* Version 9.6.4.16 Library – July 14, 2010 – Corresponds to IB API 9.64
Source Code
Readonly subversion access is provided to http://svn.karlschulze.com:8080/svn/ibapi/. Use the username “svnreadonly” and the password “Re@dOnly23″.
|
|
Posted 7/16/2010 23:29:33
|
|
|
|
If you take a look at the source code for the TWS plugin you'll see we're already using the DinosaurTech library. We're quite thankful for it, before it came around we were using ActiveX which didn't work very well (especially problematic were versioning issues).
We are planning on improving broker order synching in the next version of RightEdge. It's not just a matter of updating the plugins, we have to update the interfaces and RightEdge itself to support doing this better.
Thanks,
Daniel
|
|
Posted 7/27/2010 17:09:35
|
|
|
|
excellent. I know from my investigations that being able to recover gracefully from a broker disconnect is a highly sought after feature.
I understand the elegant solution will mean adding plumbing in RE to match the broker data with RE state. If I may suggest; if we can get the ability to get the current account status/open position info from the plug-in it would be a great first step; we could hack a workaround in the meantime.
I too am getting quite a RE/C# project backlog; but let me know how distant you think your interface update will be. This is important enough that I'll probably write my own IB plugin with the library if your target is too far off. Haven't looked into it yet.
|
|
|
|