Moving Average Envelope

Moving Average Envelope – Strategy, Rules, Returns

In the fast-paced world of financial trading, the search for a better technical indicator is never-ending, but one indicator that has been here a long time is the moving average envelope. What do you know about this indicator?

The Moving Average Envelope, also known as moving average bands or percentage envelopes, are lines set at a certain percentage (usually 5%) above and below a moving average to create a sort of envelope or channel around the price action. The moving average, which forms the middle line of the indicator, can be an exponential or a simple moving average, depending on the trader’s preference.

In this post, we will delve into the details of the moving average envelope indicator: what it means, how to calculate it, interpret it, and use it in trading. Read on!

Table of contents:

Key takeaways

  • Moving Average Envelope are lines set at a certain percentage above and below a moving average to create a sort of envelope or channel around the price action.
  • We show you a backtested Moving Average Envelope trading strategy complete with trading rules and settings that has historically performed very well.
  • You might want to check out all trading indicators.

What is a Moving Average Envelope in trading?

In trading, a Moving Average Envelope, also known as the moving average band or percentage envelope, are lines set at a certain percentage above and below a moving average to create a sort of envelope or channel around the price action.

The moving average (MA), which forms the middle line of the indicator, can be an exponential or a simple moving average, depending on the trader’s preference. However, the default setting in most trading platforms is a 20-period simple moving average with the envelope lines plotted at 5% above and below the MA. The envelope lines create some sort of parallel bands that follow price action. They are sometimes labeled price envelopes or trading bands.

Just like the Bollinger Bands, the percentage envelopes can be used to know when the price action is overextended in one direction — above the upper envelope or below the lower envelope — so one can anticipate price instability and retracement or reversal. Thus, the price rising above the upper envelope may be considered overbought, and falling below the lower envelope can be considered oversold. This is music in the ears of mean-reversion traders.

Here is an example of what a Moving Average Envelope might look like on a chart:

Moving Average Envelope example
Moving Average Envelope example

How do traders calculate the Moving Average Envelope?

To calculate the moving average envelope, traders have to follow these steps:

  1. Choosing whether to use a simple moving average (SMA) or exponential moving average (EMA).
  2. Deciding the periods to use for the moving average — let’s say, a -20 period SMA.
  3. Calculating the SMA for the chosen periods.
  4. Choosing the percentage deviation for envelopes — say, 5% (0.05).
  5. Calculating the upper envelope — this is done by adding the percentage deviation to the SMA as follows: Upper Envelope = 20-period SMA + (20-period SMA x 0.05).
  6. Calculating the lower envelope — this is done by subtracting the percentage deviation from the SMA as follows: Lower Envelope = 20-period SMA – (20-period SMA x 0.05)).

Moving Average Envelope trading strategy – trading rules, returns, performance

The Moving Average Envelope is an easy strategy to both compute and backtest. Let’s show you a strategy where we use the following trading rules:

THIS SECTION IS FOR MEMBERS ONLY. _________________ BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES CLICK HERE TO SEE ALL 350 ARTICLES WITH TRADING RULES

As you can see, this is a pretty easy strategy to backtest and code (the code is provided below).

These simple trading rules have returned the following equity curve for the S&P 500 (SPY) from its inception until today:

Moving Average Envelope trading strategy
Moving Average Envelope trading strategy

Let’s look at the statistics and trading performance metrics:

Table of Key Statistics (Moving Average Envelope)

Statistics/Metrics/Key Data/PerformanceValue
Number of trades194
Average gain per trade1.1%
CAGR (Compound Annual Growth Rate)6.9%
Win rate73%
Average winning trade2.2%
Average losing trade-2%
Max drawdown-15%
Time invested in the market25%
Risk-adjusted return (CAGR divided by the time spent in the market)27%

Is the strategy overfitted?

When we optimized the strategy the sweet spot seems to be a relatively short lookback period with a relatively small envelope. However, keep in mind that the best settings vary from asset to asset.

Moving Average Envelope – complete code

Here’s the complete code for the strategy:

THIS SECTION IS FOR MEMBERS ONLY. _________________ BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES CLICK HERE TO SEE ALL 350 ARTICLES WITH TRADING RULES

How does a Moving Average Envelope differ from other indicators?

The moving average envelope differs from other indicators in that it has an upper and lower envelope around the price action to show when the price action is overextended in one direction. The envelop lines are plotted at a certain percentage above and below the moving average that forms the base of the indicator.

Hence, the indicator is similar to the Bollinger Bands, but while the Bollinger Bands uses standard deviations from the moving average to plot the upper and lower bands, the moving average envelope uses a percentage deviation from the moving average to plot the upper and lower envelopes.

What are the components of a Moving Average Envelope?

The components of the moving average envelope are as follows:

  • The moving average: This forms the middle line of the indicator. It can either be a simple moving average or an exponential moving average. Many traders use the default setting which is usually a 20-period simple moving average.
  • The upper envelope: This is a line plotted at a certain percentage deviation above the moving average. The deviation can be 5% or less.
  • The lower envelope: This is a line plotted at a certain percentage deviation below the moving average — usually about 5% or less.

How does the Moving Average Envelope help traders predict trends?

The moving average envelope helps traders predict trends by using a moving average, which is the base of the indicator, to identify the direction of the trend with the envelope lines following suit. In other words, the slope of the moving average follows the direction of the trend and the envelope lines, which are a certain percentage away, simply follow the moving average. So, traders can use the slope of the indicator to know the direction of the trend.

Also, just like the Bollinger Bands, the percentage envelopes can be used to know when the price action is overextended in one direction — when the price is above the upper envelope or below the lower envelope — so as to anticipate a potential trend reversal, even just in the short term.

Why is the Moving Average Envelope useful for risk management?

The moving average envelope is useful in risk management because it can guide where a stop-loss order is placed. For instance, for a buy order, a trader can place their stop-loss order several pips below the lower envelope, and in a sell trade, the stop-loss order can be placed several pips above the upper envelope.

With a trend-following strategy, a trader may choose to trail their profits with a trailing stop-loss order. In that case, they can use the lower or upper envelope, as the case may be, to guide their trailing stop-loss order — in a long trade, the trailing SL could follow a few pips below the lower band, while in a short trade, it could a few pips above the upper band.

When should traders use a Moving Average Envelope?

Traders should use a moving average envelope when they want to implement a mean-reversion trading strategy or when they want to have a trend-following position trade that would require trailing the trend with a stop-loss order.

In the case of the former, the moving average envelope indicator could be used to know when the price is overbought or oversold so as to look for a signal for a mean-reversion trade. In the case of the latter, the moving average envelopes would guide the trailing stop-loss order.

What timeframes are suitable for applying Moving Average Envelopes?

Any timeframe is suitable for applying moving average envelopes — the timeframe to use depends on the trading style and the result of backtesting. An intraday trader may want to use the indicator on the hourly, 30-minute, or 15-minute timeframe. What would determine the timeframes they choose is the result of their backtesting.

A swing trader can use the indicator on the 4-hourly or daily timeframe, depending on what their data shows. A position trader may even go higher to the weekly timeframe or stay with the daily timeframe.

Can Moving Average Envelopes be customized?

Yes, the moving average envelopes can be customized, just like most other indicators. Depending on the trading platform, the default setting of the indicator is a 20-period simple moving average and 5% deviation for the envelopes, but a trader can choose a custom setting, such as an exponential moving average instead of the simple moving average, and use any period they want, say 14-period EMA. They can use a 2.5% deviation from the moving average for the envelopes.

What are the common strategies for using Moving Average Envelopes?

The common strategies for using moving average envelopes include:

  • Mean-reversion strategies: These are strategies that aim to profit from the tendency of price to reverse toward its mean after deviating significantly from it. The moving average envelopes are tailor-made for such strategies because it has a moving average as the price mean and the upper and lower envelopes as a measure of significant deviation from the mean. When the price rises above the upper envelope line and falls back into the envelope, it’s a signal to short the market for a reversal to the mean. Similarly, when the price hits the lower envelope line and reverses, it’s a signal to buy for a reversal to the mean.
  • Trend-following strategies: Traders who use trend-following strategies aim to hold their trades until the end of the trend. They usually trail their profits with a trailing stop-loss order, and the lower or upper envelope, as the case may be, can guide their trailing stop-loss order — in a long trade, the trailing SL could follow a few pips below the lower band, while in a short trade, it could a few pips above the upper band.

How do Moving Average Envelopes signal buy or sell opportunities?

The moving average envelopes show buy or sell opportunities by indicating when the price significantly deviates from its mean. In other words, when the price is overbought or oversold. Interestingly, it has a moving average as the price mean and the upper and lower envelopes as a measure of significant deviation from the mean, which is why it is very useful for mean-reversion strategies.

When the price rises above the upper envelope line and falls back into the envelope, it’s a signal to short the market for a reversal to the mean. Similarly, when the price hits the lower envelope line and reverses, it’s a signal to buy for a reversal to the mean.

What are the limitations of Moving Average Envelopes?

The limitations of moving average envelopes include:

  • Moving average envelopes cannot predict future market conditions: The indicator uses past price data and, thus, cannot predict what will happen next in the market. It cannot tell when the market will trend, which is unsuitable for mean-reversion trades, and when it will be range-bound and suitable for mean-reversion trades.
  • The indicator cannot be a standalone signal: Even for mean-reversion trades, moving average envelopes cannot be used alone. Experienced traders often combine it with price action analysis to know when the price prints reversal candle patterns after the indicator shows a significant deviation from the mean. Beginners may combine it with other indicators.

How can traders combine Moving Average Envelopes with other indicators?

To combine moving average envelopes with other indicators, traders have to understand the indicator very well to know the ones that can complement it. Generally, momentum oscillators like the RSI and stochastic can safely be combined with the moving average envelope indicator.

When the price crosses the moving average envelopes, indicating a significant deviation from the mean, the RSI or stochastic can be used to know when the reversal has started gaining momentum so as to enter the market at the right time.

What is the historical performance of Moving Average Envelopes?

The historical performance of moving average envelopes has been fair, but the indicator alone doesn’t tell the story about profitability. It is the parameters used that determine if a strategy is profitable or not.

Different parameters would give different results. It’s your backtesting that will tell you the best parameters for the best performance.

How do Moving Average Envelopes help identify support and resistance levels?

Moving average envelopes consist of 3 lines: the moving average in the middle, one upper envelope above, and a lower envelope below. All the 3 lines can act as a support or resistance, depending on where the price is relative to them — when the price is above, the lines could be support and when the price is below, the lines could be resistance.

However, during normal market volatility, the price is likely to stay within the envelopes, with the upper envelop acting as the resistance and the lower envelope acting as the support.

What are the different types of Moving Average Envelopes?

The different types of moving average envelopes include:

  • SMA-based envelopes: Some moving average envelopes are based on simple moving averages (SMA). Since SMAs don’t follow recent prices closely, this type of envelope may not follow the price action closely.
  • EMA-based envelopes: Exponential moving averages (EMAs) tend to follow the recent price action more closely because they give more weight to recent price action. Thus, envelopes based on EMAs tend to follow the price action more closely.
  • Multi-level envelopes: Some traders may add more envelopes to their indicator than just the upper and lower envelopes. This creates multi-level envelopes.

How do traders interpret the width of Moving Average Envelopes?

To interpret the width of moving average envelopes, traders take it to represent the average price channel over a certain period. This implies that when the width expands, it means that the price channel is expanding, meaning there is a higher volatility in the market.

Similarly, when the width contracts, it means the price channel is getting smaller and smaller, which implies that the volatility in the market is reducing.

What are the psychological aspects behind Moving Average Envelope trading?

The psychological aspects behind moving average envelope trading depend on how you look at it. On the one hand, the moving average envelope creates a channel within which the price should remain as it oscillates around the mean price — the moving average.

So, the price is bound within the psychological levels of the upper and lower envelopes. On the other hand, the moving average, together with its envelopes, follows the general trend of the price.

How do Moving Average Envelopes adapt to different market conditions?

The moving average envelopes adapt to different market conditions by sloping in the direction of the price action to indicate the trend direction, as well as expanding or contracting its width to show the level of price volatility.

When the market is highly volatile, the width expands, and when the market is consolidating, the width contracts. So, the size of the width indicates the level of volatility, while the slope of the lines indicates the trend direction — up means uptrend, down means downtrend, and flat means sideways.

What are the potential risks associated with using Moving Average Envelopes?

The potential risks associated with using moving average envelopes include:

  • False signals: The moving average envelope indicator can give a lot of false signals when the market condition is not suitable for the strategy you’re trading. For example, a mean reversion strategy might lead you to short a stock that has just broken out of a key level.
  • Going against the trend: it’s easy to go against the trend by trading a mean-reversion strategy with the moving average envelope indicator.

How do Moving Average Envelopes compare to Bollinger Bands?

Moving average envelopes are similar to Bollinger bands in that both try to create price channels with upper and lower bands that indicate overbought and oversold levels. Interestingly, both are based on moving averages, which form the middle line in the indicators and are used to find the price mean.

However, they differ in the way they estimate the price deviation for the upper and lower bands — while Bollinger Bands use standard deviations, moving average envelopes use percentage deviations.

What are some real-world examples of using Moving Average Envelopes?

Some real-world examples of using moving average envelopes are as follows:

Example 1: US30 mean-reversion buy signal

In the US30 chart below, you can see the price formed a dragonfly doji candle pattern after falling below the lower envelope. What followed was a quick reversal to the upside.

Moving Average Envelope trading rules
Moving Average Envelope trading rules

Example 2: US100 mean-reversion sell signal

In the US100 chart below, the price formed a shooting star pattern after rising above the upper envelope. What followed was a prolonged tight price consolidation before a quick drop to the lower envelope.

Moving Average envelope settings
Moving Average envelope settings

Example 3: US100 downtrend

See the US100 chart below. The market was in a downtrend. A trend-following strategy could easily use the upper envelope as a guide for a trailing stop. The trade would have been closed when the price hit the upper envelope. See the white arrow.

Moving Average Envelope risk management
Moving Average Envelope risk management

Example 4: US100 Uptrend

In the same US100 chart below, the market was in an uptrend. A trend-following strategy could easily use the lower envelope as a guide for a trailing stop. As you can see, the uptrend is still ongoing as of writing.

Moving Average Envelope uptrend
Moving Average Envelope uptrend

How can traders optimize their Moving Average Envelope strategies?

Traders can optimize their moving average envelopes by combining the indicator with other indicators or price action analysis. For example, traders can combine the indicator with the RSI when creating a mean-reversion strategy.

Experienced traders may also use price action analysis, such as looking for key market levels and reversal candle patterns before taking a mean-reversion trade after the price has hit the upper or lower envelope.

What are the key considerations when backtesting Moving Average Envelopes?

The key considerations when backtesting moving average envelopes include:

  • Entry and exit criteria
  • Risk management parameters, such as stop-loss levels and position sizing
  • Win rates
  • Risk-to-reward ratios
  • Profit factor
  • Expectancy

How do traders avoid common mistakes when using Moving Average Envelopes?

Traders can avoid common mistakes when using moving average envelopes by creating robust strategies with clear entry and exit criteria, as well as risk management parameters.

They also need to backtest and forward-test these strategies to be sure they can make money. After deploying the strategies, they should regularly monitor and evaluate the performance to know when to tweak the strategies.

Similar Posts