[R-SIG-Finance] quantmod charting problems
randomcz
randomcz at gmail.com
Mon Aug 22 02:43:03 CEST 2011
Hi,
The quantmod addTA function works well in one figure, but in the custom
layout, it generates a second plot rather overlapping the main plot. My
objective is to plot two stocks in one figure, and each of them have a set
of technical indicators.
The following codes works, but the TA argument in the chartSeries is just
not as powerful as addTA.
getSymbols(c('QQQQ','SPY'))
layout(matrix(1:2,2,1),c(1,1),c(1,1))
chartSeries(QQQQ['2011'], layout=NULL, TA="addSMA(10);addSMA(20)")
chartSeries(SPY['2011'], layout=NULL, TA="addSMA(10);addSMA(20)")
The following codes do not work.
getSymbols(c('QQQQ','SPY'))
layout(matrix(1:2,2,1),c(1,1),c(1,1))
chartSeries(QQQQ['2011'], layout=NULL, TA=NULL)
addSMA(10)
addSMA(20)
chartSeries(SPY['2011'], layout=NULL, TA=NULL)
addSMA(10)
addSMA(20)
Thanks,
Michael
--
View this message in context: http://r.789695.n4.nabble.com/quantmod-charting-problems-tp3759201p3759201.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance
mailing list