IB Data Plugin when Windows screen locked

I'm having difficulty capturing real-time streaming quotes with the IB Data Plugin. The goal is simple -- capture and persist streaming quotes for all the symbols in the database. This is a small database with only 9 symbols. Here is my setup:

  • The real-time quote window displays the streaming data for all symbols as it is received from TWS.
  • A chart displays plots of all the symbols.

I want the data captured while the computer is unattended and the screen is locked, but in my experiments, data is not captured when the screen is locked. How can I capture streaming quotes when the screen is locked?

Try turning off any power saving settings... a test might be to sit there with your screen locked and move the mouse every minute.

Please keep in mind that Windows by default does NOT refresh/repaint windows that are hidden/invisible.
So you may need RequestTimedRefresh http://www.amibroker.com/f?requesttimedrefresh to force refreshes.

@Tomasz I've tested this for the last week and had much better results with RequestTimedRefresh(). Quotes are captured regardless of whether the screen is locked. The real-time-quote window is not needed.

I experienced one strange episode during the last week of testing. I had two client instances of AmiBroker both capturing the data feed from a single IB TWS instance. One AmiBroker instance correctly captured quotes throughout the day, while the other instance was missing quotes during a 4-hour window. Not sure what could have caused this.

Make sure that different instances are using different client IDs (File->Database Settings->Configure)

@Tomasz Two observations:

Observation 1:
I am unable to assign two different TWS API client IDs. Whenever I change the client id in one of the databases, it overwrites the configured client ID in the other database.

Observation 2:
It looks like the IB Data Plugin is automatically detecting the client ID conflict and retrying the connection with a different ID. Both AmiBroker instances are able to connect to TWS. The second instance receives the "client id in use" error from TWS, then pauses for 10 seconds before successful connection.

I'm running two instances of 32-bit AmiBroker Version 6.30.0.

These are stored in registry in per-user key (HKEY_CURRENT_USER). You would need to run from two different Windows user accounts.

Thank you. It would be a nice improvement to store separate client ids per database.

Maybe run 2 virtual machines on your computer - that would allow you to do what you are wanting. Oracle offers a free version - Virtualbox