A Gradient-Descent Framework for Self-Adapting MQL5 Expert Advisors
Summary
This article outlines an MQL5 Expert Advisor that combines a linear regression forecast with technical indicators and gradient descent. Its proposed objective is to reduce absolute forecast error by adjusting model coefficients; the learning rate controls the size of each adjustment. The described strategy uses a moving average to infer trend, RSI and Williams Percent Range for confirmation, and a model forecast aligned with those signals before entering a trade. Stop loss and take profit distances are tied to the gap between price and the moving average.
The implementation discussion introduces an object-oriented model class and describes training and validation data, epochs, coefficients, and error measures. The article presents a framework and mentions example chart and tester displays, but the supplied text gives no quantitative performance evidence or robust out-of-sample assessment. Its recommendations acknowledge that the presented coefficient search is manual and may fail to find a solution; more advanced matrix and vector methods are suggested for future development. The proposed indicator interpretations, especially for currencies, are design choices rather than demonstrated universal rules.
Key ideas
- The model’s stated learning objective is to reduce absolute differences between forecast and subsequently observed prices.
- Gradient descent adjusts model coefficients in response to forecast error, while the learning rate sets the adjustment size.
- The proposed entry logic combines moving-average trend direction, RSI, Williams Percent Range, and forecast agreement.
- Stop loss and take profit distances are scaled using the absolute price-to-moving-average gap.
- The article describes a basic manual parameter search and acknowledges that it may not find suitable coefficients.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.