[R-SIG-Finance] quantmod charting problems

Brian G. Peterson brian at braverock.com
Mon Aug 22 03:38:37 CEST 2011


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:
> 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.
> 
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list