Interactive brokers(TWS) current version not working with MATLAB?

6 次查看(过去 30 天)
I have tried to use the ibtws function in order to make a connection between MATLAB and TWS. I got the following error:
Error using actxserver (line 90) Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws
I then tried to fix this by looking at some potential fixes that I found on this forum, but nothing seemed to work, I kept getting the same error. After that, I looked further and I found something which said that the current version of TWS simply can not be connected to MATLAB. Is this true? And is there something you can do about it?
  1 个评论
Allan MacLeod
Allan MacLeod 2018-11-10
编辑:Allan MacLeod 2018-11-10
Hi, if you're still working on this there was an update to MATLAB that solved the problem. TBC as the activeX error is gone however I still can't get it working.

请先登录,再进行评论。

回答(1 个)

Yair Altman
Yair Altman 2018-8-3
编辑:Yair Altman 2018-8-3
Sometime in recent years, presumably around TWS API 9.70, IB changed their COM server's ProgID from 'TWS.TwsCtrl.1' to 'TWS.TwsCtrl'. This breaks the Trading Toolbox code, which assumes a ProgId of 'TWS.TwsCtrl.1'. Since the Trading Toolbox's code is encrypted, you cannot modify its expected ProgId. The best you could do is to try to uninstall your API and install an old version (possibly with the assistance of IB). Note that this might break other things for you - the old API version might not be fully supported by IB today, but it's worth trying. And of course you could report this to MathWorks and hope that a fix or workaround will be provided in some future release.
Another potential reason might be if you're running on Mac or Linux: Trading Toolbox support for Interactive Brokers is limited to Windows only. This is clearly mentioned in the documented system requirements. On Mac & Linux you will see the error that you mentioned because these OSes don't support COM, on which the Trading Toolbox connector to IB is based.
You can try my Java-API-based connector ( IB-Matlab ), which does not rely on COM and does not exhibit the COM interface's problems. The reliance on Java also means that IB-Matlab works on all Matlab releases since 2008, all Matlab platforms (MacOS, Linux, Windows), and all IB API versions.
Yair Altman

类别

Help CenterFile Exchange 中查找有关 Scope Variables and Generate Names 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by