Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

trying to interface matlab with interactive brokers

110 views
Skip to first unread message

Nate Jensen

unread,
Mar 19, 2011, 12:59:04 AM3/19/11
to
I am trying to interface interactive brokers with Matlab.

At the moment, I am trying to do this through some code found on this site:
http://matlab-ib-trading.blogspot.com/2010/08/matlab-ib-historical-data.html

Unfortunately I keep getting this error:

??? Error using ==> feval
Input PROGID does not represent an Activex control.
If this PROGID used to work before, please check vendor's
documentation for equivalent activex control progid.

Error in ==> C:\Program
Files\MATLAB\R2010b\toolbox\matlab\winfun\actxcontrol.p>actxcontrol/createControl at 208


Error in ==> C:\Program Files\MATLAB\R2010b\toolbox\matlab\winfun\actxcontrol.p>actxcontrol at 179


Error in ==> tws_Connect at 8
tws = actxcontrol('TWS.TwsCtrl.1',[0 0 0 0],f,'tws_Event');

Error in ==> tws_conn_hdata_demo at 5
[f tws] = tws_Connect();

I think this is because I have not added the activex api component of interactive broker's trading work station correctly to windows but I have no clue what I am doing right now.

Any ideas?

Steven_Lord

unread,
Mar 21, 2011, 10:57:17 AM3/21/11
to

"Nate Jensen" <nateje...@gmail.com> wrote in message
news:im1d6o$7pr$1...@fred.mathworks.com...


> I am trying to interface interactive brokers with Matlab.

If I remember correctly I believe Yair Altman's done some work in that area.

http://www.mathworks.com/matlabcentral/newsreader/author/88835

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Nate Jensen

unread,
Mar 21, 2011, 12:54:07 PM3/21/11
to
"Steven_Lord" <sl...@mathworks.com> wrote in message <im7ov8$8js$1...@fred.mathworks.com>...

> If I remember correctly I believe Yair Altman's done some work in that area.
>
> http://www.mathworks.com/matlabcentral/newsreader/author/88835
>
> --
> Steve Lord
> sl...@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Thank you, and I have seen before that he has created an interface, and I am sure that his work is very high quality. The only problem that I have is that it is kind of expensive. He has also stated that he is not willing to distribute his work freely, so I think that is out of the question. Do you know of a link where he has posted some of his code? I could not find one.

Thank you though. I appreciate the help.

Yair Altman

unread,
Mar 21, 2011, 3:38:07 PM3/21/11
to
"Nate Jensen" wrote in message <im7vrf$e6i$1...@fred.mathworks.com>...


My IB-Matlab application is described here: http://UndocumentedMatlab.com/IB-Matlab
Regarding the cost, I believe that it is the least expensive of all the commercial alternatives. It is certainly a small sum for an active trader or automated trading algorithm developer.

Moreover, are the dozens of hours it would take you to develop and test a comparable application not worth the monetary cost? Your work time cannot be that cheap.

I expect it will be difficult to find a free working application for active trading. Matlab is not free; IB is not free; trading is not free; people make huge investments and profits in algorithmic trading black-boxes - so why should the IB-Matlab trading platform be free???

For the record, IB-Matlab is Java (not ActiveX) based. As such, it works on all platforms where both Matlab and TWS run, including 64-bit Windows and Linux where ActiveX is problematic.

Best regards and good luck in your trading,

Yair Altman
http://UndocumentedMatlab.com

Timothy McGarvey

unread,
Mar 24, 2011, 6:17:05 AM3/24/11
to
I have had similar issues with interfacing between Matlab and IB and received the same error messages that the person who wrote the first thread described. The cause in my case was that I was running a 64-bit version of Matlab and the ActiveX dlls are 32-bit only (as is the whole IB platform). So, the only way to use the IB ActiveX API to interface with Matlab is with a 32-bit version of Matlab.

"Yair Altman" wrote in message <im89ev$7su$1...@fred.mathworks.com>...

Prashant bajpayee

unread,
Jun 8, 2011, 8:56:06 AM6/8/11
to
HI
I am able to use those code and it connects with IB API. But I am getting error in requesting historical data. I have dropped a message to author and waiting for his reply.
Will keep you updated on this.

regards
Prashant

"Nate Jensen" wrote in message <im1d6o$7pr$1...@fred.mathworks.com>...

0 new messages