Skip to content
Prev 10592 / 15274 Next

about quantmod and shaded region

Hi all,

I am a new user of quantmod package (version 0.3-8) and I have some 
problems.
I would like to add shaded regions to a chart.

1. I tried the following commands  (from slide presentation of Jeff Ryan)

getSymbols('^FCHI',source="yahoo")
CAC=FCHI
candleChart(CAC,theme="white",subset='2012-05::2012-08',TA=NULL)
addTA(RSI(Cl(CAC))>50,col="green",border=NA,on=-1)
addTA(RSI(Cl(CAC))>40 & RSI(Cl(CAC))<50 ,col="red",border=NA,on=-1)
addTA(RSI(Cl(CAC)) ,on=NA)

So the first region RSI(Cl(CAC))>50 is correctly shaded, but the second 
region
RSI(Cl(CAC))>40 & RSI(Cl(CAC))<50 isn't. So I supposed a bug with 
bollean vectors
with addTA() ?


2. On the web, I found a mail from Jeff Ryan and he proposed to use the 
function xts()
Nevertheless, this command gives me an error concerning the function rect().


3. I also tried to use the function newAT() without success.. :-(


Best Regards,
O.