Adaptive Gaussian Moving Average MT4
- Indicatori
- Cao Minh Quang
- Versione: 1.0
- Attivazioni: 5
The Adaptive Gaussian Moving Average or also known as Machine Learning Moving Average (MLMA) is an advanced technical indicator that computes a dynamic moving average using a Gaussian Process Regression (GPR) model. Unlike traditional moving averages that rely on simple arithmetic or exponential smoothing, MLMA applies a data-driven, non-linear weighting function derived from the Gaussian process, allowing it to adaptively smooth the price while incorporating short-term forecasting capabilities.
MLMA is particularly useful in noisy market environments where standard moving averages may lag or provide less reliable signals.
The moving average also includes bands, used to highlight possible reversals.
Input Parameters
-
Length: Calculation period of the moving average. Higher values yield a smoother average, emphasizing long-term trends and filtering out short-term fluctuations.
-
Forecast: The number of bars ahead to forecast using the trained GPR model. Higher values create a more responsive moving average but will result in more overshoots, potentially worsening the fit with the price. Negative values will result in a smoother moving average.
-
Sigma: The standard deviation parameter for the Gaussian kernel, controlling the smoothness and sensitivity to price variations.
-
Multiplicative Factor: A scaling factor applied to the standard deviation or predicted confidence bands (optional), often used for dynamic thresholds or envelope calculations.
-
MA Color: The display color of the moving average line.
-
Alert/Notification: Enables alerts when price crosses above or below the MLMA line.
Do note that an excessively high "Forecast" setting will result in overshoots, with the moving average having a poor fit with the price.
How It Works
-
The indicator uses the most recent Length bars to fit a Gaussian Process model to the price.
-
It calculates a weighted moving average, where the weights are determined by the GPR kernel function.
-
It optionally forecasts future values based on the trained model (up to Forecast steps ahead).
-
With the help of the Sigma and Multiplicative Factor, dynamic bands can be plotted to define areas of interest or potential support/resistance.
-
When alerts are enabled, the indicator notifies the user of crossover events between the price and the MLMA line.
Use Cases
-
Identifying dynamic support/resistance zones based on forecasted levels.
-
Detecting trend continuation or reversal when price breaks above or below the MLMA.
-
Combining with other signals like RSI or volume to build a machine-assisted trading strategy.
