Building an MQL5 Regression Signal with Separate Entry and Exit Thresholds
Summary
The article explains how to build a custom MQL5 Wizard signal using regression analysis rather than relying only on built-in indicator signals. It describes solving for regression coefficients with matrix LU decomposition, then estimating forecast error and using measures such as collinearity and coefficient of determination to decide whether the signal is strong enough. The signal can use changes in price ranges or moving averages as inputs, with separate parameter sets for opening and closing positions.
For evaluation, the author compares market orders with pending orders and reports that pending orders reduced drawdown while giving up some profit. The article presents the approach as a framework to customize, not a finished profitable system. Its reported tests use a particular setup and optimization criterion; the author recommends extensive historical tick testing and forward walks before deployment, and suggests combining the signal with other trading logic.
Key ideas
- The custom Wizard signal solves regression coefficients with a matrix solver and uses them to estimate a forecast.
- Separate input parameters let the signal apply different thresholds to opening and closing decisions.
- The model can use changes in moving averages or high-low price ranges as its data.
- The article reports lower drawdown with pending orders, alongside reduced profits.
- Historical tick tests and forward validation are needed before considering deployment.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.