Skip to content

IBrokers and automatic submission of orders?

5 messages · Michael, Cedrick Johnson, Jeff Ryan +1 more

#
Hi all,

What's the best way to set up a timer in IBrokers, and take a snapshot
of market data at fixed interval, and then place some orders, and run
other tasks?

Also,  reqMktData(tws, twsEquity("QQQQ")) returns data continuously,

is there a way for it to only return one snapshot of data at one time,

just need to sample at fixed interval using a timer...

Thank you very much!

-----------

And how to submit order such as "market open", "market close", and
"good-until-after-some-time" in IBrokers?

Thanks a lot!
#
Probably a roundabout way to do this would be to use Rserver and write a 
Java app using the Rserver wrapper to issue command reqHistoricalData at 
X intervals (setup a Java timer object or loop) and place orders (via 
the same java program connected to the RS wrapper) using twsOrder and 
placeOrder.

I'm not too familiar with callbacks and such in the IBrokers package.

hth,
c
Michael wrote:
#
I just presented some slides about this at R/Rmetrics 2009 in
Meielisalp about 2 days ago.

This should give you a bit more information on the current development
of IBrokers, and how you can accomplish this all in R.

HTH,
Jeff

On Wed, Jul 1, 2009 at 8:12 PM, Cedrick
Johnson<cedrick at cedrickjohnson.com> wrote:

  
    
#
Thanks Jeff-

I'll check out the R/Rmetrics conference page. Unfortunately I missed 
that (and the Chicago one) this year.

Speaking of which, when is there going to be another Chicago gathering 
of R users, say for a meetup at a downtown pub?

-c
Jeff Ryan wrote: