Discussing the article: "A Practical Kalman Filter Price Smoother in MQL5: Adaptive Noise Estimation Without External Libraries"

 

Check out the new article: A Practical Kalman Filter Price Smoother in MQL5: Adaptive Noise Estimation Without External Libraries.

Fixed-weight moving averages introduce regime-insensitive lag. This work presents an adaptive scalar Kalman filter indicator in native MQL5 that estimates process noise Q from rolling return variance and measurement noise R from rolling price variance, with floor clamps for stability, and recomputes the Kalman Gain on every bar. The chart-overlay output is benchmarked against a 20-period EMA using MAE, RMSE, lag, and smoothness metrics to quantify tracking and noise suppression.

Simple and exponential moving averages share a single architectural weakness: their blending weight is fixed. That static weight produces excessive jitter in low‑volatility consolidation and unacceptable phase lag during rapid breakouts. What is needed is a filter that, on every bar, formally decides whether to trust the newest close or the model’s prior estimate — and does so adaptively rather than by manual tuning of N. Equally important for practitioners: the solution must be a self-contained, native MQL5 indicator with transparent diagnostics (Kalman Gain exposed in the Data Window), controlled warmup behavior, and guardrails against numerical degeneration in near‑zero volatility.

This article presents that practical solution: a scalar state‑space Kalman smoother whose blending weight is the optimally computed Kalman Gain and whose process and measurement noise variances are estimated online from rolling windows of returns and price deviations.

Author: Ushana Kevin Iorkumbul

 
it is repainted indicator ?