Error connecting Interactive Brokers TWS to MATLAB

3 visualizaciones (últimos 30 días)
kevin gulstene
kevin gulstene el 6 de Dic. de 2017
Respondida: Yair Altman el 10 de Dic. de 2017
Running this command
ib = ibtws('', 7496);
Produces this error
Error using actxserver (line 90)
Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws
My configuration consists of:
Windows 10
MATLAB 2017b
Trader Workstation 968.2g
IB Gateway 9.72.18
Running the IB test application in VB or C# works with the Trader Workstation configuration but the Trading Tools function in MATLAB cannot connect to the IB API.
I have looked through older thread but have not found a solution.

Respuestas (2)

Yair Altman
Yair Altman el 6 de Dic. de 2017
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.
If you need a Matlab-IB connector on Mac or Linux, then try using my IB-Matlab toolbox instead: http://undocumentedmatlab.com/ib-matlab. IB-Matlab is based on IB's Java (not COM) API, so it runs well on all platforms that support Matlab: Windows, Mac and Linux.
Yair Altman
  1 comentario
kevin gulstene
kevin gulstene el 6 de Dic. de 2017
Thank you Yair. I am running windows 10. Should have mentioned that in the post.

Iniciar sesión para comentar.


Yair Altman
Yair Altman el 10 de Dic. de 2017
I believe that 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 still 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.
Or, as I mentioned earlier, you could try my Java-API-based connector (IB-Matlab), which does not rely on COM and does not exhibit any of the problems that are common with the COM-based interface.
Yair Altman

Categorías

Más información sobre Transaction Cost Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by