[R-SIG-Finance] IBrokers

Arnaud Battistella arnaudb25 at gmail.com
Fri Jan 15 02:16:05 CET 2010


Hi all,

I recently started using IBrokers and it really is a great package.
But I have some questions about its use:

1. placeOrder seems to work as expected but I was wondering how to
make the command exit by itself and prevent it from returning any
output (unless asked for it).
As it doesn't exit I don't know how to include it in a script as R
hangs on this command waiting for a user interrupt...

2. Is there a way to submit several orders with one placeOrder call?
the usual c() or list() don't work...

3. I was wondering how to extract tick prices from reqMktData.
As of now I simply  obtain them from the csv output as follow:
myWrapper <- eWrapper.MktData.CSV(1)
reqMktData(tws, twsEquity("QQQQ"), eventWrapper=myWrapper, file="data.csv")
and then selecting the right column of data.
Still if I understood correctly tick prices are also stored in .Data
but I could not figure out how to access them...
myWrapper$get.Data("data") only gives the last tick prices

4. Where can I find the column names for the csv output of
eWrapper.MktData.CSV()?

Thanks!

A.



More information about the R-SIG-Finance mailing list