Envelopes EA: no-code builder for MT4 / MT5
ChannelsEnvelopes are two lines a fixed percentage above and below a moving average. Set the deviation to fit the symbol's volatility: 0.1%–0.5% suits forex.
Rules you can build with it
Works as an entry rule or an exit rule. Short rules are mirrored automatically.
- LongCandle opens above Upper envelopeShortCandle opens below Lower envelope
- LongCandle opens below Lower envelopeShortCandle opens above Upper envelope
- LongCandle opens below Upper envelopeShortCandle opens above Lower envelope
- LongCandle opens above Lower envelopeShortCandle opens below Upper envelope
- LongCandle opens above Lower envelope after opening below itShortCandle opens below Upper envelope after opening above it
- LongCandle opens below Upper envelope after opening above itShortCandle opens above Lower envelope after opening below it
Settings
| Settings | Default | Range |
|---|---|---|
| Period | 20 | 5 – 100 |
| MA type | Simple moving average (SMA) | Simple moving average (SMA) / Exponential moving average (EMA) / Smoothed moving average (SMMA) / Linear weighted moving average (LWMA) |
| Price | Close | Close / Opening price / High / Low / Median price / Typical price / Weighted close |
| Deviation % | 0.1 | 0.01 – 2 |
How the backtest and the EA calculate it
Same as MT5's Envelopes: upper band = MA × (1 + deviation%), lower band = MA × (1 − deviation%).
Signals use only closed candles and are filled at the next candle's open. The exported EA checks conditions in the same order, so you get similar results in the MT5 Strategy Tester.
Example strategies
Example 1
- Entry · Envelopes (20, SMA, Close, 0.1): Candle opens above Upper envelope
- Stop-loss 300 points, take-profit 600 points
Example 2
- Entry · Envelopes (20, SMA, Close, 0.1): Candle opens above Upper envelope
- Entry · Moving Average (50, EMA, Close): MA rises
- Stop-loss 300 points, take-profit 600 points
Examples are just a starting point: open one to change settings or add filters, then check it with backtests and robustness tests. Backtest results don't indicate future returns.