Trader Toolbox realtime function is apparently undefined even when I have the file path identified.

3 ビュー (過去 30 日間)
I receive the error, "Undefined function 'realtime' for input arguments of type 'ibtws'." when I run the realtime function. I have an established connection to IBTWS and market data subscription. Below is my code:
%
%connects to ib
%ib = ibtws('',7496)
%define your stock
%ibContract = ib.Handle.createContract;
ibContract.symbol = 'RAD';
ibContract.secType = 'STK';
ibContract.exchange = 'SMART';
ibContract.currency = 'USD';
%retrieve live data
f = '233';
tickerid = realtime(ib, ibContract, f)
end
  3 件のコメント
Giovanni Rodriguez
Giovanni Rodriguez 2017 年 7 月 30 日
which ibtws
ver('trading')
C:\Program Files\MATLAB\R2014b\toolbox\trading\trading\@ibtws\ibtws.p
% ibtws constructor
----------------------------------------------------------------------- -----------------------------
MATLAB Version: 8.4.0.150421 (R2014b)
MATLAB License Number: 'I have omitted for security'
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 14393)
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
----------------------------------------------------------------------- -----------------------------
Trading Toolbox Version 2.1.1
(R2014b)
>>
Walter Roberson
Walter Roberson 2017 年 7 月 31 日
Which ABI version are you using? I just installed 971.06 (not the latest), and in R2015a I got to
No method 'reqMktDataEx' with matching signature found for class 'COM.TWS_TwsCtrl_1'.
Error in ibtws/realtime (line 62)
c.Handle.reqMktDataEx(tickerID(i),s{i},fldList,0)
I do not happen to have R2014b installed on my Windows virtual machine; I could install it if necessary.

サインインしてコメントする。

採用された回答

Yair Altman
Yair Altman 2017 年 7 月 31 日
編集済み: Yair Altman 2017 年 7 月 31 日
The realtime() function of Trading Toolbox for IB TWS was only introduced in R2015a. If you upgrade your Matlab license you should be able to use it, but not in your current R2014b.
If you need this functionality in R2014b (or any other Matlab release between R2007a and today), then try using my IB-Matlab toolbox instead: http://undocumentedmatlab.com/ib-matlab
Yair Altman
  2 件のコメント
Giovanni Rodriguez
Giovanni Rodriguez 2017 年 7 月 31 日
I will try this and get back with whether or not this solved the issue.
Giovanni Rodriguez
Giovanni Rodriguez 2017 年 8 月 5 日
I have a friend who tried the same code on his R2016a version and everything worked well. Thanks for your time, everyone.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by