IbcAlpha / IBC

Automation of Interactive Brokers TWS. You can download the latest release here: https://github.com/ibcalpha/ibc/releases/latest
GNU General Public License v3.0
971 stars 174 forks source link

Lock and Exit > Never lock Trader Workstation #257

Open wibuf opened 1 month ago

wibuf commented 1 month ago

I've went through the config and the documentation, but I haven't been able to find anything about setting IBKR to Never lock Trader Workstation under the Lock and Exit configuration in the IBKR Settings.

Is it possible to set this with IBC?

Thanks

handelsmeisterei commented 1 month ago

Today I woke up to a TWS version of 10.28 in my trading setup that was locked. The "Never lock Trader Workstation" setting was gone (worked fine for the last months). I have no clue how this can be circumvented. Does IBCAlpha need to refill the password as soon as TWS locks? 10.27 does not have that problem

wibuf commented 1 month ago

I'm on 10.27.1f, but the locking issue started for me this morning, resolved when I manually set to Never Lock. I am guessing there was some sort of update where the TWS config was set to defaults or something.

handelsmeisterei commented 1 month ago

Yes, 10.27 still has that setting. In 10.28 the "Never lock" setting does not appear at all.

wibuf commented 1 month ago

Other users here mention the setting is back in 10.28, maybe try to restart TWS or reinstall?

https://groups.io/g/twsapi/topic/tws_option_never_lock_trader/103503025

handelsmeisterei commented 1 month ago

Thanks for sharing! Will retry tomorrow.

handelsmeisterei commented 1 month ago

can confirm that it works again.

wibuf commented 1 month ago

That's good news. I think this issue needs to remain open. I believe IBC should be able to set that setting during launches.

rlktradewright commented 1 month ago

I disagree. I don't see any reason to be able to configure this via IBC.

wibuf commented 1 month ago

My concern was that this setting was set to default after some sort of TWS update I believe, and affected multiple people it seems. This prevented the API from working properly, if IBC were able to set this after login the API would have continued to function properly. But I understand if that's not part of the scope of this software.

rlktradewright commented 1 month ago

If the setting is actually there (ie visible in the Lock and Exit dialog and not disabled), then users can just set it manually. You only need to set it once, and the setting is persisted between sessions.

If the setting is NOT there (as seemed to be the case for some users), then IBC can't possibly set it. The best it could do would be to enter the password when the user tries to access TWS while it's locked. I'd be reluctant to do this until I know why this draconian rule is being enforced (if it is, which I doubt - an error on IBKR's part seems much more likely).

By the way, TWS being locked doesn't affect API access at all, as far as I can see.

subes commented 2 days ago

We are getting these API errors occasionally when we forget to configure this in a new TWS instance: TWS error - [#438] The application is now locked After a while our API connection drops (though might also be due to an unstable internet connection).

Would be great if IBC was able to configure this automatically because auto-restart (which can be configured by IBC fails to be configured because when auto-lock is enabled the auto-restart is disabled sadly): image (after setting never lock we can configure auto restart) image