Discussing the article: "From Static MA to Adaptive Filtering (Part 2): Implementing the SAMA_NLMS Indicator 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 2): Implementing the SAMA_NLMS Indicator in MQL5.
This article implements the NLMS-based Self-Adaptive Moving Average as a working MQL5 indicator. It provides the complete source code and explains the key design choices, including inline execution, uniform weight seeding, closed‑bar updates, and stability bounds, along with installation, usage, and limitations. The result is a compiled, chart‑ready SAMA_NLMS indicator and a clear basis for subsequent EA benchmarking.
You already saw the NLMS idea in Part 1. In practice, however, transplanting the update equation from a notebook into MQL5 often breaks in ways traders and developers care about: the model can train on the still-forming bar, blow up on flat data, be skewed by single-bar spikes, and produce different live values after a terminal reload because its internal weight state depends on the exact history processed. This part stops treating SAMA as a formula and treats it as production software. It embeds NLMS into a chart-ready MQL5 indicator with proper buffers, input validation, ATR-based error clamping, an Efficiency‑Ratio adaptive μ, weight leakage and optional normalization, a mandatory warm-up phase, and a rule to train only on closed bars. The goal is explicit: provide a SAMA_NLMS.mq5 you can compile, attach to a chart, and use in trading scenarios without obvious instability or surprise re‑rendering.
Author: Ushana Kevin Iorkumbul