Skip to content
Prev 275002 / 398506 Next

quantmod package

Generally getting intraday/real-time data requires some sort of (paid)
source, but if you are willing to just strip free quotes off the
internet non-stop, perhaps something like this:

while(TRUE) {
   cat( file = "FileName.txt", c(getQuote(YHOO), recursive = T), "\n",
append = T)
}
# You could get better performance from a textConnection depending on
how often you intend to do this

You'll have to read.table() the .txt file into an xts before being
able to apply most of the quantmod bells and whistles to it.

Look at chartSeries() for the graphical stuff. As far as combining
them, you could put a chartSeries() command in the loop, but that's
going to slow things down since it will require recharting each time.

Michael
On Thu, Oct 20, 2011 at 3:03 AM, ATANU <ata.sonu at gmail.com> wrote: