Hull moving average MACD

Category: Indicators By: Nicolas Created: October 11, 2015, 4:35 PM
October 11, 2015, 4:35 PM
Indicators
0 Comments

This is the typical MACD (Moving Average Convergence Divergence) indicator made of Hull moving average.

The MACD is made of difference of 2 moving average, a fast one and a slower one (12 and 26 periods). Then the signal line is made of a Simple Moving Average of 9 periods of the this difference value.

 

// Parameters : 
// p = 26 (slow period)
// q = 12 (fast period)
// r = 9 (signal line)

MMhullfast = Weightedaverage[round(SQRT(p))]( 2*Weightedaverage[round(p/2)](close)-Weightedaverage[p](close))
MMhullslow = Weightedaverage[round(SQRT(q))]( 2*Weightedaverage[round(q/2)](close)-Weightedaverage[q](close))

myMACD = MMhullslow - MMhullfast

Signal = AVERAGE[r](myMACD)

RETURN myMACD AS "MACD hull histogram",Signal AS "Signal MACD"

 

Download
Filename: Hull-MACD.itf
Downloads: 275
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...