Dynamic Linear Regression EA
- Experts
-
Abraao Moreira
MQL5 Developer | Indicators, Expert Advisors and Trading Tools - Versione: 1.1
Why use it
- A mean-reversion rule you can read in one sentence: buy at the lower channel line, sell at the upper one.
- The channel is recalculated from the last N candles, so it follows the market.
- Only five inputs to configure.
How it works
- A linear regression line is fitted to the closes of the last Window size candles.
- An upper line and a lower line are drawn at a fixed distance in points from it.
- When the current price reaches the lower line, the EA sends a market buy order. When it reaches the upper line, it sends a market sell order.
- Every position is sent with the stop loss you set.
The channel uses the same logic as the Dynamic Linear Regression indicator by the same author.
Parameters (labels as shown in the Inputs tab, with defaults)
- Window size (50): number of candles used in the regression.
- Top line distance (points) (100)
- Bottom line distance (points) (100)
- Stop Loss (10000)
- Volume (1)
FAQ
- Are results shown? No. Test it in the Strategy Tester on your own symbol and broker data first.
- Which symbols? Any symbol; set the distances and the volume to suit that symbol's point size and contract.
- Does it use a take profit? The parameters expose only a stop loss.
---

Amazing EA system, but it lacks a trailing stop min.