Trouble with API for Interactive Brokers

Questions about MultiCharts and user contributed studies.
willywave
Posts: 3
Joined: 22 Oct 2010

Trouble with API for Interactive Brokers

Postby willywave » 05 Nov 2010

Hi,

I am having trouble connecting MC (version 6.1 build 3605) to the Interactive Brokers TWS-platform (version 4). Following the instruction video, I set up first TWS, then MC.

Please see the screen dump where you can see MC and TWS next to each other: the ports are the same, "ActiveX and Socket clients" is ON in TWS. However, MC keeps saying it does not see any IB-connection . Well, there is an IB connection running indeed, IMHO...

Why is MC not seeing my TWS installation?
Do you know what to do in order to get a connection between MC and TWS?

PS: this printscreen is for a TWS demo account, but the same occurs on a live account: no connection whatsoever.

Thanks for your help!

Image

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: Trouble with API for Interactive Brokers

Postby sptrader » 05 Nov 2010

I'm not sure if you're using the stand-alone version of TWS(on your desktop), but I do and it requires a separate API for TWS and MC to work together (in TWS downloads area I think), then install the TWS app and adjust the settings. (you need Java as well but you probably have that installed already)

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Trouble with API for Interactive Brokers

Postby Dave Masalov » 08 Nov 2010

Hi,

I am having trouble connecting MC (version 6.1 build 3605) to the Interactive Brokers TWS-platform (version 4). Following the instruction video, I set up first TWS, then MC.

Please see the screen dump where you can see MC and TWS next to each other: the ports are the same, "ActiveX and Socket clients" is ON in TWS. However, MC keeps saying it does not see any IB-connection . Well, there is an IB connection running indeed, IMHO...

Why is MC not seeing my TWS installation?
Do you know what to do in order to get a connection between MC and TWS?

PS: this printscreen is for a TWS demo account, but the same occurs on a live account: no connection whatsoever.

Thanks for your help!
Dear willywave,

Please try to uncheck the "Launch Trader Workstation at start" check box in Quote Manager --> Tools --> Data Sources -->IB. This should solve the problem.

willywave
Posts: 3
Joined: 22 Oct 2010

Re: Trouble with API for Interactive Brokers

Postby willywave » 11 Nov 2010

Thanks for your help!

SPtrader: I searched through the IB site, but could not find the download you're referring to.
Anyway, disabling the "Launch TWS at start" option allowed for the platforms to connect. (Thanks, Support). The live feed is now running fine.

However, one thing I noticed: does IB not provide historical data? When I bring up a chart through the TWS API, all I see plotted is the chart from the point that I opened/started the chart. There is not any history shown (be it tick / minute / hour/ daily...)

Is this normal behavior (because IB does not provide historical data through their TWS-API ?), or am I missing a setting?

Thanks again!

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Trouble with API for Interactive Brokers

Postby Dave Masalov » 11 Nov 2010

Dear willywave,

Please make sure that you have enabled "download missing historical data" in File --> Preferences --> Data Server Mode. Have you added the symbol From Data Source? If you have added it manually, please delete it and add From Data Source (Quote Manager --> Instrument --> Add --> From Data Source).

If the steps above do not help, please try to plot a chart for this symbol in TWS to see if you can get historical data there.

willywave
Posts: 3
Joined: 22 Oct 2010

Re: Trouble with API for Interactive Brokers

Postby willywave » 11 Nov 2010

Hi,

Thanks for your help, problem solved!
(My mistake: I somehow switched off the "historical data" section under the Data Source Settings for Interactive Brokers. Stupid me, I guess :)

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Trouble with API for Interactive Brokers

Postby Dave Masalov » 11 Nov 2010

Dear willywave,

Glad to hear that the problem has been solved.


Return to “MultiCharts”