MACD zero lag complet:r=9
q=26
p=12
EMA1=ExponentialAverage[p](close)
EMA2=ExponentialAverage[p](EMA1)
DIFFERENCE=EMA1-EMA2
ZEROLAGEMA13=EMA1+DIFFERENCE
EMA11=ExponentialAverage[q](close)
EMA22=ExponentialAverage[q](EMA11)
DIFFERENCE1=EMA11-EMA22
ZEROLAGEMA21=EMA11+DIFFERENCE1
ZEROLAGMACD=ZEROLAGEMA13-ZEROLAGEMA21
EMA33=ExponentialAverage[r](ZEROLAGMACD)
EMA44=ExponentialAverage[r](EMA33)
DIFFERENCE2=EMA33-EMA44
ZEROLAGTRIG=EMA33+DIFFERENCE2
HISTO = ZEROLAGMACD - ZEROLAGTRIG
return ZEROLAGMACD AS "ZeroLagMACD" , ZEROLAGTRIG AS "ZeroLagsignal", HISTO as "Histogram"