trader workstation 4 (TWS) interactive brokers

thosecars82

Junior member
Messages
16
Likes
0
Hello there
I have this problem with the trader workstation platform.

Every time I launch, in debuggin mode, a client application which connects to TWS succesfully, the next thing happens: If I stop abruptly the debugging mode, then next time the client application tries to connect to TWS with the same id, the connection is rejected. I understand this point because that means that according to TWS there is still client application connected with that ID. Now my question is:

If there is a way, how can I get this client id unattached? I would like to tell TWS to do so from the relaunched client application, for example, through a sentece right before the typical eConnect sentence that connect to TWS?
Moreover, how can I see those clients which opened a connection in TWS and close one of those connections but this time from TWS?

Thanks in advance
 
Why not use a new ID each time the client program is run ? E.g. save the last used number in a file or database or the registry (if windows) and add 1 each time.

Broken TCP connections might time out after a while but how long to wait is probably O/S dependent.
 
Thks, I had already thought about doing that but did not believe people were doing that thing for this simple purpose. Eventually I saw, using a 0 as client id does the trick.
Thanks though again.
 
Top