MACD Zero Lag by wiart

57049 downloads / 8679 views / Created: 08.02.2016
1 2 3 4 5
 Average Rating: 5

Indicator Description

This indicator is a MACD variant, called "Zero Lag MACD", because it is supposed to not lag behind the price, as opposed to the classical MACD.
The formula can be found at https://www.mql5.com/en/code/9993
ZeroLAG MACD(i) = (2*EMA(Close, EFP, i) - EMA(EMA(Close, FP, i), FP, i)) - (2*EMA(Close, SP, i) - EMA(EMA(Close, SP, i), SP, i));
ZeroLAG MACD Signal(i) = 2*EMA(ZeroLAG MACD(i), SigP, i) - EMA(EMA(ZeroLAG MACD(i), SigP, i), SigP, i);
where:
EMA - exponential moving average;
Close - a price of the closing of the bar;
FP - a period of the quick moving average;
SP - a period of the slow moving average;
SigP - a period of the signal moving average;

I improved it so that various moving average methods can be used (exponential, simple, weighted, smoothed), the default being Exponential.

Enjoy!
Laurent

Comments

Risk warning: Forex, spread bets and CFD are leveraged products. They may not be suitable for you as they carry a high degree of risk to your capital and you can lose more than your initial investment. You should ensure you understand all of the risks.
Copyright © 2006 - 2025, Forex Software Ltd.;