Using ALGLIB Filters to Reduce Moving Average Crossover Whipsaws
Summary
This article presents an MQL5 indicator for comparing a raw moving average crossover with signals based on preprocessed prices. It explains simple, exponential, and linear regression moving averages, then introduces Singular Spectrum Analysis to separate trend from shorter fluctuations. A cubic spline’s first derivative is also used to identify directional changes through zero crossings. The indicator is designed to display the price series, filtered series, and crossover markers together for visual comparison.
The article describes the methods and implementation choices, including limiting calculations to recent bars because SSA can be computationally expensive. It does not provide quantitative performance results or a controlled comparison demonstrating that the filters improve profitability or reduce losses. Its claims about fewer signals in ranging markets are therefore best treated as a motivation for experimentation. The examples are an indicator demonstration, not a complete trading system with validated entries, exits, execution assumptions, or risk controls.
Key ideas
- ALGLIB provides MQL5 implementations of moving average filters, SSA, and spline analysis.
- Linear regression filtering estimates a local trend by fitting a line across a rolling window.
- SSA aims to separate longer-term structure from short-term fluctuations in a price series.
- Spline derivative zero crossings can be used as possible cues for changes in direction.
- The article proposes visual comparison, but gives no measured evidence of trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.