Skip to content
All library documents

Adaptive Moving Average Signals with the Levenberg–Marquardt Solver

Article MQL5 articles

Summary

This article describes an MQL5 Expert Advisor that replaces a fixed moving-average crossover threshold with parameters fitted on a rolling window. Its proposed volatility-adjusted moving average cross uses two exponentially weighted averages and an ATR-based adjustment. A Levenberg–Marquardt solver estimates filter parameters by minimizing one-step-ahead price prediction errors, with a small regularization term intended to limit overfitting. The article explains the solver's reverse-communication interface, where the program supplies residuals and Jacobian values as requested, and contrasts this local method with derivative-free optimization.

The text proposes testing the system on historical GBPUSD data and discusses convergence, computational cost, and numerical versus analytical derivatives. However, the supplied document is incomplete: key implementation and testing sections are truncated, and it gives no complete performance comparison or reproducible results for the trading strategy. Solver convergence and faster computation do not by themselves demonstrate predictive value or profitability. The approach is best read as an engineering example of online parameter fitting; its signal quality and stability would need independent testing, including realistic costs and regime changes.

Key ideas

  • The proposed filter adjusts moving-average parameters and a volatility threshold on a rolling price window.
  • The Levenberg–Marquardt solver fits parameters by minimizing prediction residuals.
  • Its reverse-communication interface requires the program to provide objective values and Jacobian information.
  • The article favors a local solver for speed when the objective and initial estimates are suitable.
  • The supplied text does not provide complete strategy results, so adaptation and convergence claims do not establish profitability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.