3

I have financial data stream from redis and/or rabbitmq. And would like to chart it with quantmod. I found in documentation that getSymbols has some predefined sources (yahoo, csv and others), but need none of them. So questions:

  1. How load data from custom data.frame?
  2. How add new tick in case real-time translation?

In comments was said that no way to plot real-time with quantmod, so is any R package compatible with shiny for real-time plotting?

Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
user3003873
  • 543
  • 1
  • 4
  • 21
  • I assume that the best way is to download the data as csv file and to use quantmod's `getSymbols()` function with argument `src='csv'`. – RHertel Aug 12 '15 at 08:54
  • I don't think that you can chart data with real-time ticks. In this case I hope that I'm wrong and that somebody will post an answer showing how this could be done. – RHertel Aug 12 '15 at 09:00
  • See the source for `getSymbols.skeleton` (and all the other `getSymbols` 'methods') for ideas how to implement a `getSymbols` 'method' for redis and/or rabbitmq. There really isn't a nice way to plot in real-time with R, since R's plot devices are pen-and-paper (meaning the entire plot must be redrawn for each new point added). Also note that asking for a package recommendation is off-topic for StackOverflow. – Joshua Ulrich Aug 12 '15 at 11:11
  • Found that you can create OHLC object in quantmodm, and pass zoo object as argument, so first question solved. About real-time data - may be the one way to plot redrawable at first time. – user3003873 Aug 12 '15 at 12:27
  • In Shiny you can force an object to be updated at an interval, or via a push button. – kristang Aug 12 '15 at 14:25

0 Answers0