Discussing the article: "From Static MA to Adaptive Filtering (Part 1): Introducing SAMA with NLMS in MQL5"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: From Static MA to Adaptive Filtering (Part 1): Introducing SAMA with NLMS in MQL5.
This article introduces the Self-Adaptive Moving Average (SAMA), an adaptive filter leveraging the Normalized Least Mean Squares (NLMS) algorithm. It explores why fixed-period averages fail, how NLMS adapts bar by bar, and the engineering protections required for production. This conceptual and mathematical foundation prepares you for the MQL5 code implementation in Part 2.
Traders know the pattern: an SMA or EMA can look perfect for a while — until the market regime shifts and the same fixed-period filter either lags badly in impulses or chops accounts in sideways ranges. The issue is not that moving averages are poorly coded, but that their period is static while the market is not. That mismatch forces endless manual retuning: shorten the period and you get noise; lengthen it and you get lag.
This series offers a concrete alternative: a chart-ready Self-Adaptive Moving Average (SAMA) implemented in MQL5, powered by the Normalized Least Mean Squares (NLMS) adaptive-FIR framework. Crucially, this is written with an explicit success criterion: produce a live, non-repainting indicator that adapts to regime changes without per‑regime period tuning, remains stable during price spikes and news, updates weights only on closed bars, and is usable directly on charts, in EAs, and in backtests. Part 1 explains the motivation, the math, and the core NLMS loop. Part 2 builds the full MQL5 indicator; Part 3 benchmarks it against classical filters.
Author: Ushana Kevin Iorkumbul