[R-SIG-Finance] Help with iBrokers data

wlblount bill at easterngrain.com
Tue Apr 9 03:12:32 CEST 2013


about 30 days ago i posted here looking for historical, intraday data.  since
then i have figured out how to use the ibrokers package to download approx 4
days of 3 minute data (650 bars x 8 variables = 5200 which is the ibrokers
limit for 1 request).

library(IBrokers)

tws <- twsConnect()

symbol <- "uvxy"

contract<- twsEquity(symbol)

pricedata<-reqHistoricalData(tws,contract,barSize="3 mins", duration = "1
W")

save(pricedata,file=symbol)

twsDisconnect(tws)


my next step is to figure out how to 1- loop this request to get older  data
(i would like to get 2 years) and append the saved file.  and 2 -eventually
move up to periodically updating 50 or so symbols and saving and appending
all the symbol data to individual files.


does anyone have any code or could anyone point me in the right direction? 
my coding skills are only slightly above control c and control v .  any help
would be greatly appreciated and i will be happy to share data, code, or
whatever i end up with.  thanks.  Bill




--
View this message in context: http://r.789695.n4.nabble.com/Help-with-iBrokers-data-tp4663719.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list