Interactive Brokers

Setting options in TWS

Before downloading the price history through Interactive Brokers you need to set some parameters in TWS (Trader Workstation), follow these steps:

a) Run Interactive Brokers software (Trader Workstation -TWS)

b) Follow this:

 

c) Choose All API Settings:

 

and click there "Create" button:

 

type there 127.0.0.1 and click OK:

 

You should do this procedure once only.

Downloading price history

Now you are ready to download the price history. In Timing Solution click "Download historical price data" button here:

 

 click "More" button and choose "Interactive Brokers" item:

 

Fill out this form with information about instrument/exchange/bar.. and click these buttons (#1-Connect #2-Download history #3-Exit):

 

Real time streaming

Step #1 running IB datafeed To run real time streaming through Interactive Brokers, click "Data feed" button: and then click "TS Datafeed" button there:

 

Highlight "Interactive Brokers" item. You will get this dialog box:

 

Step #2: Connecting with TWS Click "Connect" button. Make sure that TWS application is running. Otherwise it is impossible to download the price history through IB.

If everything is Ok in "Diagnostic" panel should appear the massage "Connected ...."

 

Otherwise please check troubleshootings #1, #2 and #3

 

Step #3: updating existing price history  After that click "Step #2: Update price" button to update the existing price history:

 

If everything is Ok you should get the price history here:

 

and the price chart in the Main screen should be updated as well.

Otherwise please check troubleshooting #4.

 

Step #4: running real time streaming and click "Step #3: Run Real Time" to run real time streaming:

 

 

To stop real time streaming, click "Non Active" button in "Data Feed" window:

 

 

Troubleshooting #1 - no connection with TWS

Check that API settings are correct (see the beginning of this class)

 

Troubleshooting #2 - no connection with TWS

Check that TWS is running on your computer.

 

Troubleshooting #3 - you got a message, "Target machine actively refused"

In most cases, it means that some other (3rd party) software is connected with TWS. Try shutting down that application.

 

Troubleshooting #4 - the price history is not updating

a) Check that symbol, expiration date, and exchange info are correct.

 

b) Check the last updated record, it is displayed here:

 

 

c) Check that TWS streams quotes correctly. You can control this process. Click this button; the program will show the last price history piece received from TWS: