Moving average envelopes, also called trading bands, are two lines drawn a fixed percentage above and below a moving average. They mark the edges of a stock’s normal trading range around its average. The idea is that eager buyers and sellers push prices to extremes now and then, and prices tend to settle back toward more typical levels afterwards. Envelopes are one of the oldest band tools and the simplest relatives of Bollinger Bands and Keltner Channels.
How it is calculated
Middle line = SMA(N) or EMA(N) of the close
Upper band = middle line × (1 + K / 100)
Lower band = middle line × (1 - K / 100)
N is the moving average period and K is the width in percent. With a 20-day average and a 5% width, the upper band sits 5% above the average and the lower band 5% below it. Unlike Bollinger Bands, the distance does not change with volatility: the bands are always the same percentage away from the average.
How to read it
- Range extremes. In a sideways market, a move to the upper band means price is stretched above its average, and a move to the lower band means it is stretched below. Range traders sell near the upper band and buy near the lower one, with the average as the first target.
- Trend strength. In a strong uptrend, price may push through the upper band and stay near it. That shows strength rather than a reason to sell. The same is true of the lower band in a downtrend.
- Pullbacks in a trend. In an uptrend, pullbacks often stop near the moving average rather than at the lower band. The lower band then marks an unusually deep pullback.
- Breakouts. A close well outside the band after a long quiet spell can mark the start of a new move, especially on heavy volume.
Settings and common mistakes
- Width. The right percentage depends on the stock’s volatility: the more volatile it is, the wider the bands. A common approach is to pick a width that contains most of the price action over the past several months. Short-term traders often use a 20-day average with 2.5% to 5%; longer-term studies use a 50-day or longer average with 5% to 10% or more.
- One width for every stock. A 3% band is wide for a utility and very narrow for a small biotech. Set the width per stock, or use a volatility-based band such as Bollinger Bands or Keltner Channels.
- Fading every touch. Selling at the upper band works in a range and fails in a trend. Check the slope of the average first.
- SMA or EMA. An EMA-based envelope reacts faster to new prices; an SMA-based one is smoother. The choice matters less than the width.

Live chart: SPY (S&P 500 ETF), daily, with a 3% envelope around the 20-day simple moving average. The chart updates every trading day.
Screen for it on MarketInOut
Our formula language has smaeub and smaelb for the upper and lower SMA envelope, and emaeub and emaelb for the EMA version, each with a period and a width in percent. Stocks in a long-term uptrend that have fallen below the lower 5% band of their 20-day average:
exch(nyse,nasdaq) and type(stock) and price > 1 and advol(21) > 1
and price > sma(200) and price < smaelb(20,5)
Stocks that just closed above the upper 5% band on heavy volume, a possible breakout:
exch(nyse,nasdaq) and type(stock) and price > 1 and advol(21) > 1
and price ca smaeub(20,5) and rvol(21) > 1.5
Related: Bollinger Bands, Moving averages, Average True Range.