Hi Mailinglist members,

 

I’ve got a question concerning the histogram which is plotted in the
addMACD() method. I expect that this represents the difference between the
macd and the signal line, but when I implement it by myself, I get a clearly
other result. Please check the following code snippet. I add the MACD
histogram via the addMACD() method and in addition a second TA, which
represents the difference between the signal and the macd. 

Could you tell me whether I’m mistaking respectively what is plotted in the
histogram?

 

library(quantmod)

 

from.dat <- as.Date("01/01/03", format="%m/%d/%y")

to.dat <- as.Date(Sys.Date(), format="%m/%d/%y")

getSymbols("ARL.DE", src="yahoo", from = from.dat, to = to.dat)

arl <- last(ARL.DE , "100 days")

 

chartSeries(arl, theme="white", TA=NULL)

addMACD()

macd <- MACD(arl)

macdHist <- macd$macd - macd$signal

addTA(macdHist, type="h")

 

 

Thanks in advance.

--

Konrad Hoppe

 <http://www.konrad-hoppe.com/> http://www.konrad-hoppe.com/

 


	[[alternative HTML version deleted]]

