Skip to content

quantmod charting problems

3 messages · Brian G. Peterson, randomcz

#
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.
#
try 

on=0

as a parameter to addTa (or add_TA, which works with the newer
chart_Seris)

Cheers,

   - Brian
On Sun, 2011-08-21 at 17:43 -0700, randomcz wrote: