Envelopes is one of the oldest and simplest volatility indicators on the platform: two bands plotted at a fixed percentage distance above and below a Moving Average. Where Bollinger Bands breathe in and out with the market, Envelopes bands never change width on their own — they're a constant "how far has price stretched from its average" ruler, and that simplicity is both the indicator's biggest strength and its biggest weakness.
How Envelopes Is Calculated
The calculation has two ingredients: a moving average and a percentage offset. First, the indicator plots a moving average of a chosen period — the default is typically a 20-period MA, though it can be simple, exponential, smoothed, or linear-weighted depending on the platform. Second, it takes that MA value and shifts it up by a fixed percentage (commonly 0.1%) to draw the upper band, and shifts it down by the same percentage to draw the lower band.
So if the 20-period MA is sitting at 1.10000 and the deviation is set to 0.1%, the upper band sits at 1.10110 and the lower band sits at 1.09890 — exactly 0.1% above and below the average, no matter how calm or chaotic the market has been recently. That's the entire formula: no standard deviation, no variance, no statistics — just a moving average and a percentage. This is what makes Envelopes easy to understand at a glance: the bands are literally a "channel" traced a fixed distance from the average line, and price wandering outside that channel is, by definition, further from its average than the percentage allows.
Entry Conditions
- BUY — price touches or pierces the lower band, suggesting the market has stretched further below its average than the deviation setting normally allows, and is due for a bounce back toward the moving average.
- SELL — price touches or pierces the upper band, suggesting the market has stretched further above its average than the deviation setting normally allows, and is due for a pullback back toward the moving average.
Like most band-touch systems, this is a mean-reversion trade: the moving average itself is the implicit target, since that's the line the bands are measuring distance from. It works best in ranging markets rather than trending ones — in a strong trend, price can walk along one band for many bars in a row without ever reverting, which is the same "band ride" trap that catches Bollinger Bands traders. Combining a lower-band touch with a horizontal support and resistance level, or waiting for a rejection candle at the band rather than trading the first touch blindly, meaningfully improves the odds of the bounce actually happening.
Tuning the Moving Average Period
The MA period controls how reactive the centerline is to recent price. A short period — say 10 — hugs price closely, which means the bands (being a fixed percentage from that line) also hug price closely and get touched far more often. A long period — say 50 — smooths out short-term noise, so the centerline moves more slowly and the bands only get touched when price makes a more significant move away from the longer-term average.
Shorter periods suit traders who want more signals and are comfortable filtering out weaker ones by hand; longer periods suit traders who would rather wait for fewer but more meaningful setups. There's no universally correct period — it depends on the pair, the timeframe, and how much noise you're willing to trade through. Many traders start from the same 20-period default used by Bollinger Bands, then adjust from there once they've watched how it behaves on their chosen chart.
Tuning the Deviation Percentage
The deviation percentage controls how far the bands sit from the moving average, and it interacts directly with the MA period to shape how often the system fires. A tight deviation like 0.05% keeps the bands very close to the average, so almost any wiggle in price touches one of them — this generates frequent signals but many of them will be noise, especially during quiet sessions. A wide deviation like 0.3% or more keeps the bands well away from the average, so a touch only happens after a genuinely large move — fewer signals, but each one represents a more meaningful stretch.
The general rule: shorter MA period plus tighter deviation percentage means more frequent, noisier signals suited to fast, hands-on trading; longer MA period plus wider deviation percentage means fewer, more significant signals suited to patient, higher-conviction trading. Because currency pairs differ enormously in their typical daily range — a major pair like EUR/USD behaves very differently from a volatile cross — the deviation percentage that works well on one instrument can be almost useless on another, which is exactly the tradeoff explored in the next section.
Envelopes vs Bollinger Bands
The core difference between the two indicators is how their band width behaves. Bollinger Bands calculate their bands using standard deviation, so the channel automatically widens when the market gets more volatile and narrows when it calms down — the band width itself is a live read of current volatility. Envelopes, by contrast, uses a fixed percentage offset from the moving average, so the channel stays exactly the same width in a dead-quiet market and in a wildly volatile one.
That fixed width is Envelopes' defining tradeoff. In a calm market, a 0.1% deviation might be far too tight, meaning price grazes the bands constantly and generates a stream of low-quality touches. In a volatile market, that same 0.1% deviation might be far too wide, meaning price rarely reaches either band even during a real move worth trading. Bollinger Bands solve this automatically by re-scaling with volatility every bar; Envelopes solves nothing automatically — it simply gives you a simpler, more transparent calculation in exchange for that self-adjustment. For traders who want to see and control exactly how the channel is built, that transparency has real appeal; for traders who want the indicator to adapt on its own, Bollinger Bands does more of the work.
A Word of Caution
Because Envelopes' band width never adapts to volatility on its own, the deviation percentage needs to be manually re-tuned whenever you change pairs, switch timeframes, or the market's volatility regime shifts. A 0.1% setting that produced clean, well-spaced signals on the daily chart of a major pair could be completely wrong on a 15-minute chart of a volatile pair, generating either a flood of meaningless touches or almost no signals at all. This is the opposite of Bollinger Bands, which self-adjust their width to current conditions and so tend to behave reasonably across a wider range of instruments and timeframes without retuning.
In practice, this means Envelopes rewards traders who are willing to sit down, watch the indicator on their specific chart for a while, and adjust the deviation percentage until the band touches line up with genuinely stretched price rather than every minor wiggle. Set-and-forget use of the default percentage across every pair and timeframe is the most common way traders end up disappointed with this indicator — the fix is almost always a deviation percentage tuned to the instrument in front of you, not a flaw in the concept itself.
Download the Indicator
This custom indicator plots the upper and lower Envelopes bands around a moving average, with automatic alerts when price touches either outer band. It's available for both MetaTrader 4 and MetaTrader 5 below.
How to Install — MetaTrader 4
- Download the
envelopes-alert.mq4file below. - Open MetaTrader 4 → click
File→Open Data Folder. - Place the file in the
MQL4/Indicatorsfolder. - Restart MetaTrader 4, then drag the indicator from the Navigator window onto the chart.
How to Install — MetaTrader 5
- Download the
envelopes-alert.mq5file below. - Open MetaTrader 5 → click
File→Open Data Folder. - Place the file in the
MQL5/Indicatorsfolder. - Restart MetaTrader 5, then drag the indicator from the Navigator window onto the chart.
Both files are source code — open and review the full code before using it, for your own safety.