problems retreiving realtime data V3 bloomberg

조회 수: 1 (최근 30일)
Paul
Paul 2014년 7월 7일
댓글: Paul 2014년 7월 7일
i am running real time data retreival via bloomberg v3 like this
>> [subs,t] = realtime(c,{'IBM US Equity','F US Equity'}), {'Last_Trade','Volume'},'v3stockticker') Error using blp/realtime (line 32) Not enough input arguments.
I do not understand the error in line 32. The corresponding line is posted below:
if ischar(f)

채택된 답변

Geoff Hayes
Geoff Hayes 2014년 7월 7일
편집: Geoff Hayes 2014년 7월 7일
There is an additional bracket in your line of code
[subs,t] = realtime(c,{'IBM US Equity','F US Equity'}), ...
{'Last_Trade','Volume'},'v3stockticker')
Note the close bracket after {'IBM US Equity','F US Equity'} which means that the realtime function inputs are limited to just c and {'IBM US Equity','F US Equity'}
[subs,t] = realtime(c,{'IBM US Equity','F US Equity'})
and the last two inputs are ignored..which means that not enough inputs are supplied and so the error message makes sense.
Just remove that unneeded bracket, replacing your line of code with
[subs,t] = realtime(c,{'IBM US Equity','F US Equity'}, ...
{'Last_Trade','Volume'},'v3stockticker')
Try the above and see what happens!
  댓글 수: 3
Geoff Hayes
Geoff Hayes 2014년 7월 7일
The "..." means that the second line is just a continuation of the previous line. I did that in this case because I found that the line of code took two lines and it seemed cleaner to separate it in this fashion. Copying something like
x =
randi(4,1,1)
will fail with the Error: Expression or statement is incomplete or incorrect. when pasted into (and then run from) the Command Window, but
x = ...
randi(4,1,1)
will work.
As for accumulating the data, you could try to store the numeric data in a matrix (or cell array if some non-numeric data is expected) for each set of retrieved data points (in this case, I guess there would be data from IBM US Equity and F US Equity). You could probably just update the sample callback that you referenced in a previous question. Rather than storing the data in A that gets created on each call, you could use a persistent variable to store the data each time the callback is called. Of course, given the update rate (how often the callback is called) your new matrix might get very large.
I don't have the DataFeed Toolbox so can't provide much more detail. Type doc persistent in the Command Window for details on persistent local variables.
Paul
Paul 2014년 7월 7일
thanks a lot really appreciated your help

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bloomberg Desktop에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by