[R] Quantmod several indicators

giorgio.garziano at tin.it giorgio.garziano at tin.it
Fri Sep 25 17:19:00 CEST 2015


Hi,
Both following code examples plot bollinger band over the ticker main plotand Williams Power below the main plot.
1. chartSeries(YHOO,theme="white",TA = c(addBBands(200,2), addWPR(n=300)))
2. chartSeries(IB,theme="white",TA = c(addBBands(200,2)))   addWPR(n=300)
See:
http://around-r.blogspot.it/2015/04/financial-data-exploratory-analysis_27.html
for examples.
In general, if you like to plot indipendently a trading indicator computed by quantmod, you can do:
wpr <- addWPR(n=300)plot(wpr at TA.values, type='l')   -- or any other R plot library you like
as in @TA.values are stored trading indicator values for any indicator.

Giorgio Garziano 

 
	[[alternative HTML version deleted]]



More information about the R-help mailing list