My goal is to let R implement a strategy instantly when I get the right
signal(market price).

But now I am stuck at the point that when I call function "reqMktData" to
receive real-time data, I found R will be occupied unless I manually stop
it or I ask to return snapshot data.

I was wondering if anyone can provide a working example that collects real
time data through IBrokers and allows trading logic to be executed? For
instance, I would like IBroker keeps updating the market data in real time
and I can also analyse the data using R at the same time.

Even though I may be able to write a while loop to get real-time data for
the latter case, I found it very slow compared to what I want it to be
(each call of reqMktData will take a few seconds).

I have spent a few days searching for solutions and found nothing. Hope
this is not a bad question. Thank you!

	[[alternative HTML version deleted]]

