How can I solve this problem?

>> ib=ibtws('',7496)
Error using feval
Server Creation Failed: Die angegebene Prozedur wurde nicht gefunden.
Error in actxserver (line 86)
h=feval(['COM.' convertedProgID], 'server', machinename, interface);
Error in ibtws
---------------------------------------------------------------------------------------------------- MATLAB Version: 9.0.0.341360 (R2016a)
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 10586)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
I installed all requirements.
Further I checked if the ActiveX controller is insatalled and is working. Everything all right.
I used the following tutorial to set the right settings: http://www.youtube.com/watch?v=Q6OVl9MMlcs
Then I checked with IB API support. Unforunately they couldn't help me. They ment that I have done everything right.
So I am runnign out of ideas... Can please someone help me?
Best Regards
Simon

12 Comments

Are you using a 32 bit version of R2015a or the 64 bit version? The 64 bit version would not be able to talk to the 32 bit TWS driver.
I am using a 64 bit version of Matlab R2015
But this would mean if I had installed 64Bit version of TWS it would work.
But firstly I installed the 64 Bit version of TWS and I had the same Error. After reading in several forums I installed the 32 bit version of TWS.
There is no possibility of getting the 32 bit version of TWS to work with 64 bit MATLAB.
Yes I already red it... Do you know if there's an 64 Bit API version from IB?
If not... I have to buy a 32 bit version of matlab and run it on a 64bit operating system, which makes no sense...
Your existing R2015a license is happy to operate at 32 bits on the same system; no additional purchase is required.
So now I have reinstalled everything with 32 bit versions...
No I have a new Error Message:
>> ib=ibtws('',7496)
Error using actxserver (line 90) Server creation failed. Invalid ProgID 'TWS.TwsCtrl.1'.
Error in ibtws (line 38)
The result from dependens
Can this be true that so many dll's are missing? Any idea where I can get a package? Or can someone of you who is running matlab with tws api, provide me all your dll's ?
Ideas?
Does Matlab IB TWS API run on windows 10? Is there anybody using it?
Hi simon. I'm having the same problem and I'm starting to believe that 64bit version of windows does not work well with IBTWS that was apparently written for 32 bit OS. It seems o be looking for a procedure or component in a folder that does not belong to the 64 bit version or is named differently. Already tried the same steps. Installed and un-installed 32 and 64 bit versions of both Matlab and TWS. I have other computer that runs on Windows 10 x86 version. Connection goes smoothly, but is an old machine and does not have enough memory to handle Matlab and TWS at the same time. I bought a New machine that comes with Windows10 64 bit pre installed and I've spent the whole weekend trying to solve it. ¿Have you managed to solve this?. I'm out of options here.

Sign in to comment.

Answers (3)

ivan Kiriyanov
ivan Kiriyanov on 25 Jan 2017
Here's the solution for IB API ver 9.71. It appears that Matlab does not work with later versions of API.
1. Uninstall the API component by navigating to Control Panel -> Program and Features 2. Locate and delete the following files if they are still present:
C:\Windows\System32(SysWOW64)\TwsSocketClient.dll C:\Windows\System32(SysWOW64)\MsFlxgrd.ocx C:\Windows\ddedll.dll
3. Restart your computer. 4. Install the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) http://www.microsoft.com/en-us/download/details.aspx?id=5638 5. Install the Microsoft Visual J# 2.0 Redistributable Package. http://www.microsoft.com/en-us/download/details.aspx?id=4712
If the problem still persists, you may have to register the Tws.ocx file manually. It is essential that you run CMD or command in Administrator, even though you login as local administrator. Please follow the below steps:
1. Copy Tws.ocx (C:\TWS API\bin\ActiveX\ to the following directory: C:\Windows\System32(SysWOW64)\ 2. Click the Search Windows icon (Magnifier glass) and in the Search area, type "cmd” 3. Right click the "Command Prompt" banner, and select "Run as Administrator" 4. At the command prompt, enter: %systemroot%\System32(SysWOW64)\regsvr32.exe Tws.ocx 5. This should successfully register your Tws.ocx.

1 Comment

ivan, i cant find the tws.ocx files anywhere.... I performed steps 1-5 but when i re-install the API, i get the same error. Do you have any other suggestions or would you mind educating me regarding the TWS.ocx files? Thank you, Daniel Matteson

Sign in to comment.

I follow the 1st 3 steps. But 4th step is unable to execute in command prompt. kindly give some ideas.
Copy Tws.ocx (C:\TWS API\bin\ActiveX\ to the following directory: C:\Windows\System32(SysWOW64)\ 2. Click the Search Windows icon (Magnifier glass) and in the Search area, type "cmd” 3. Right click the "Command Prompt" banner, and select "Run as Administrator" 4. At the command prompt, enter: %systemroot%\System32(SysWOW64)\regsvr32.exe Tws.ocx
Yair Altman
Yair Altman on 10 Jan 2018
You can also try the suggestions here: https://www.mathworks.com/matlabcentral/answers/111625-trading-toolbox-connecting-to-interactive-broker
(and of course, you are always welcome to try my Java-based IB-Matlab connector, which does not use ActiveX/COM)

Categories

Asked:

on 22 Jul 2016

Answered:

on 10 Jan 2018

Community Treasure Hunt

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

Start Hunting!