Borrar filtros
Borrar filtros

realtime with Interactive Brokers

1 visualización (últimos 30 días)
Nicholas McCormick
Nicholas McCormick el 4 de Mayo de 2016
Respondida: Scott Meier el 9 de Nov. de 2018
I am curious if there is a way to directly set the data that the function 'realtime' outputs to a variable. The way it is shown the the Matlab help file, http://www.mathworks.com/help/trading/ibtws.realtime.html, whatever variable you assign to 'realtime' gets set to the ID number, and then it creates a variable called ibBuiltInRealtimeData. Once ibBuiltInRealtimeData loads, then I can set it equal to a variable, but it would be preferable to not have to wait for the variable to load in the workspace since this is inside a loop to get data for thousands of different contracts.
I know that 'getdata' does essentially what I am trying to do, but it rarely works for me.
Thanks in advance for any help,
Nick

Respuestas (1)

Scott Meier
Scott Meier el 9 de Nov. de 2018
I have done this exactly. I open a new,unique connection for just the 'realtime' communications. I call the 'realtime' function and then assign each element of the 'realtime' response to a unique variable. I still use a loop to update the variables, but I no longer need to repeatedly use the 'getdata' function.

Categorías

Más información sobre Trading Technologies en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by