필터 지우기
필터 지우기

realtime with Interactive Brokers

조회 수: 1 (최근 30일)
Nicholas McCormick
Nicholas McCormick 2016년 5월 4일
답변: Scott Meier 2018년 11월 9일
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

답변 (1개)

Scott Meier
Scott Meier 2018년 11월 9일
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.

카테고리

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