problems retreiving realtime data V3 bloomberg

1 visualización (últimos 30 días)
Paul
Paul el 7 de Jul. de 2014
Comentada: Paul el 7 de Jul. de 2014
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)

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 7 de Jul. de 2014
Editada: Geoff Hayes el 7 de Jul. de 2014
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 comentarios
Geoff Hayes
Geoff Hayes el 7 de Jul. de 2014
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 el 7 de Jul. de 2014
thanks a lot really appreciated your help

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Bloomberg Desktop en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by