Zero Lag MACD Indicator |
//www.aflcode.com p = Param("P",12,3,36,2); q = Param("Q",26,3,52,2); r = Param("R",9,3,15,1); EMA1= EMA(Close,p); EMA2= EMA(EMA1,p); Difference= EMA1 - EMA2; ZeroLagEMAp= EMA1 + Difference; //--------------------------------------- EMA1= EMA(Close,q); EMA2= EMA(EMA1,q); Difference= EMA1 - EMA2; ZeroLagEMAq= EMA1 + Difference; //--------------------------------------- ZeroLagMACD=ZeroLagEMAp - ZeroLagEMAq; //--------------------------------------- // Signal line EMA1= EMA(ZeroLagMACD,r); EMA2= EMA(EMA1,r); Difference= EMA1 - EMA2; ZeroLagTRIG= EMA1 + Difference; Plot(zerolagMACD,"",5,4); Plot(zerolagtrig,"",7,4); //===========================end zeroLagMACD
Sign up here with your email
ConversionConversion EmoticonEmoticon