Allan W MacLeod
Allan W MacLeod

Reputation: 39

Interactive Brokers and MATLAB Connection

I'm trying to connect MATLAB to interactive brokers. I'm aware there was a bug before. However, I got an email in August saying it was fixed. I'm currently running this code;

% establish connection to TWS ib = ibtws('',7497);

%% create currency handles ibEURUSD = ib.Handle.createContract; % set forex credentials ibEURUSD.symbol = 'EUR'; ibEURUSD.secType = 'CASH'; ibEURUSD.exchange = 'IDEALPRO'; ibEURUSD.currency = 'USD';

cur = getdata(ib,ibEURUSD);

% close IB connection close(ib);

Getting the result for cur of "not connected", has anyone managed to get IB working with MATLAB, if so could you point towards a good resource?

Thanks

Allan

Upvotes: 0

Views: 230

Answers (1)

Yair Altman
Yair Altman

Reputation: 5722

Consider using the IB-Matlab connector (https://undocumentedmatlab.com/IB-Matlab), which is actively maintained since 2010 and is the highest-rated product on IB's Marketplace by a large margin.

Upvotes: 1

Related Questions