Why do I get "No method 'reqMktDataEx' with matching signature found for class 'COM.TWS_TwsCtrl_1'." in 2014a

조회 수: 1 (최근 30일)
When I try to use the 'ibtws' class in MATLAB R2013b to access data from the Interactive Brokers (IB) Trader Workstation , for instance if I am trying to run the example function 'reqMktDataEx', I get the following error:
No method 'reqMktDataEx' with matching signature found for class 'COM.TWS_TwsCtrl_1'.
My code is as follows, how can I fix this?
ib = ibtws('',7496);
eventNames = {'errMsg','tickSize','tickString','tickPrice'};
for i = 1:length(eventNames)
registerevent(ib.Handle,{eventNames{i},...
@(varargin)ibExampleRealtimeEventHandler(varargin{:})})
end
f = findobj('Tag','IBStreamingDataWorkflow');
if isempty(f)
f = figure('Tag','IBStreamingDataWorkflow','MenuBar','none',...
'NumberTitle','off');
pos = get(f,'Position');
set(f,'Position',[pos(1) pos(2) pos(3)+37 109])
colnames = {'Trade' 'Size' 'Bid' 'BidSize' 'Ask' 'AskSize' ...
'Total Volume'};
rownames = {'AAA','BBB','DDDD'};
data = cell(3,6);
uitable(f,'Data',data,'RowName',rownames,'ColumnName',colnames,...
'Position',[10 30 582 76],'Tag','SecurityDataTable');
uicontrol('Style','text','Position',[10 5 497 20],'Tag','IBMessage');
uicontrol('Style','pushbutton','String','Close',...
'Callback',...
'evalin(''base'',''close(ib);close(findobj(''''Tag'''',''''IBStreamingDataWorkflow''''));'')',...
'Position',[512 5 80 20]);
end
ibContract = ib.Handle.createContract;
ibContract.symbol = 'IBM';
ibContract.secType = 'STK';
ibContract.exchange = 'SMART';
ibContract.currency = 'USD';
reqMktDataEx(ib.Handle,1,ibContract,'100',0);

채택된 답변

Friedrich
Friedrich 2014년 5월 19일
Hi,
I think you missed to install something. The steps you need to take are
1) Download/Install Interactive Brokers Trader Workstation (Desktop Trading Client) from the following link: https://www.interactivebrokers.com/en/index.php?f=552
2) Download/Install the Interactive Brokers API software from the following link:
3) Log into IB Trader Workstation with a license user account.
  댓글 수: 1
Mike
Mike 2014년 7월 12일
편집: Image Analyst 2014년 7월 13일
This answer is wrong. It's a version change issue. This function needs an additional argument.
reqMktDataEx(IB.Handle, 3, ibContract,'100',0,IB.Handle.createTagValueList);
Your answer is wrong, unfortunately.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Yair Altman
Yair Altman 2014년 7월 12일
You may wish to try the cross-platform IB-Matlab product, which is Java-based (not ActiveX):
IB-Matlab doesn't have such bugs, it is very reliable.

카테고리

Help CenterFile Exchange에서 Trading Technologies에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by