IB TWS – Forever up! Fixing disconnect routine

Imagine you need to create an algo tool that should work with Interactive Brokers through Trading Workstation API. Nothing complex, right – so, you develop the tool, test it using the paper account, all goes smoothly and you’re ready to go live. However, once done…

Multithreaded TWS MFC application: Yes or No

Multithreading is a nut for several years by now. This is the only way to achieve scalability: CPU clocking is close to limit. There are a lot of cookbooks explaining how to build multithreaded applications properly. The only issue is that building a block of…

IB Gateway API – Writing algo in a different way

We were implementing a basket trading application with execution through Interactive Brokers Gateway API. Among major features, we had to implement a recuperation of current cash balances and specifying security type for correct symbol matching. Trying to implement the algo logic, we suddenly stuck into…