Third Generation Moving Average For MQL5
3rd Generation Moving Average MetaTrader indicator - is an advanced version of the standard moving average (MA), which implements a rather simple lag-reducing procedure based on the longer MA period. The method was first described by M. Duerschner in his article Gleitende Durchschnitte 3.0 (in German). The presented version uses λ = 2, which provides the best possible lag-reducing. Higher λ increases similarity with the classic moving average. The indicator is available for both MT4 and MT5. It doesn't require using any DLL.
- MA_Period (default = 50) - a period of the 3rd generation moving average.
- MA_Method (default = 1) - method of the moving average. 0 - SMA, 1 - EMA, 2 - SMMA, 3 - LWMA.
- MA_Applied_Price (default = 5) - applied price for the moving average. 0 - PRICE_CLOSE, 1 - PRICE_OPEN, 2 - PRICE_HIGH, 3 - PRICE_LOW, 4 - PRICE_MEDIAN, 5 - PRICE_TYPICAL, 6 - PRICE_WEIGHTED.
As you see, the 3rd Generation MA (red line) offers slightly less lag than the conventional EMA (blue line) and reacts to the price changes faster. Unfortunately, it is still prone to lag and may produce false signals. You can use the 3rd Generation Moving Average Forex indicator the same as the standard moving average - to detect the current trend direction.
This indicator is used for trading in the Adjustable MA 3G expert advisor for MetaTrader.