Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock and Exit > Never lock Trader Workstation #257

Open
wibuf opened this issue May 20, 2024 · 13 comments
Open

Lock and Exit > Never lock Trader Workstation #257

wibuf opened this issue May 20, 2024 · 13 comments

Comments

@wibuf
Copy link

wibuf commented May 20, 2024

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
Copy link

handelsmeisterei commented May 20, 2024

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
Copy link
Author

wibuf commented May 20, 2024

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
Copy link

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

@wibuf
Copy link
Author

wibuf commented May 20, 2024

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
Copy link

Thanks for sharing! Will retry tomorrow.

@handelsmeisterei
Copy link

can confirm that it works again.

@wibuf
Copy link
Author

wibuf commented May 21, 2024

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
Copy link
Member

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

@wibuf
Copy link
Author

wibuf commented May 22, 2024

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
Copy link
Member

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
Copy link

subes commented Jul 3, 2024

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

@rlktradewright
Copy link
Member

Sorry for the delay in replying.

I must be missing something here. Can you explain your use case in more detail. I don't understand the following:

  • why do you have to keep setting up new TWS instances? Do you have lots of different accounts?
  • when you install TWS for a new account, is the 'Lock Trader Workstation after...' setting already set on?
  • why can't the user just unlock it and change the setting as required?

@wibuf
Copy link
Author

wibuf commented Jul 8, 2024

Just to add my experience with this, I've had IBC set up and working flawlessly for about a year. However, in that time, "something" on the TWS side has reset that Lock Trader Workstation to the default 30 minutes, 2-3 times. Not really breaking IBC, but preventing the automation I have set up for TWS. Not a huge deal, I manually set it back and it's good to go until next time. I know this isn't an IBC issue, but I originally created this issue figuring the goal for IBC would be complete automation of the login process of TWS, and I figured since IBC is editing settings at launch anyways that it would be beneficial to have the capability of checking that setting as well. If TWS is just going to lock after 30 minutes that's not full automation of it. But that's just my two cents, I appreciate all the work you've put into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants