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.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// 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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials