Technical analysis in trading consists of analysing past prices statistically and mathematically and using the results to forecast future prices. One of the most popular tools for this is the moving average (MA). The moving average is an indicator that follows the price with a lag, meaning that it generates a signal after the trend has changed.

The moving average smooths out individual highs and lows in the price, making it easier to see the overall trend. The MA also filters out noise (random market volatility and corrections) and helps the trader decide which positions to enter and trade according to the trends.

The simplest trading strategy that uses the moving average consists of buying an asset when its price crosses the MA line from below and selling it when it crosses the MA line from above.

SMA — Simple Moving Average

To calculate the value of each point on the SMA curve, you need to sum up the closing prices of the last N candles and divide the result by N.

Since market trends can be divided into short-term, mid-term, and long-term, it’s the trader’s chosen strategy that defines the interval N (the number of days) to be used for the MA. In practice, the following ranges are used:

  • 5–20 for short-term trends
  • 20–50 for mid-term trends
  • 50–200 and up for long-term trends

If the current price is above the MA line, then the market is considered bullish in the short-term; conversely, if the price is below the MA, then the market is considered bearish. The MA owes its popularity to its simplicity, but it also has some flaws:

  1. A lot of false signals (especially during periods of sideways movement)
  2. Time lags

Variations of the Moving Average

In order to make the forecasting more precise and to reduce the number of false signals, several modifications of the simple MA have been developed:

  • Exponential (EMA) — more sensitive than the SMA because it gives more weight to more recent prices; used to analyze short-term trends.
  • Weighted (WMA) — assigns a greater weight to more recent prices but also uses a more complex formula and is considered more reliable.
  • Volume-weighted (VWMA) — takes into account not only the changes of the price but also those of the volume.
  • Kaufman’s adaptive moving average (AMA or KAMA) — uses a dynamic smoothing constant that is sensitive to market volatility.
  • Corrected average (CA) — reacts to the current market volatility but ignores incoming signals when the trend is weak.
  • Hull moving average (HMA) — virtually eliminates the lag and can assume two different colors depending on the direction of the trend.
  • Arnaud Legoux moving average (ALMA) — designed to solve the issues of insufficient smoothing and sensitivity found in many other MA types; can be used as a dynamic support/resistance level.
  • Least square (LSMA) — tries to predict the price movement under the assumption that the current trend will continue; calculates a least squares regression line and projects it into the future.

Xena Exchange has presented its own modification of the MA called the Xena Corrected Average. This indicator uses contrasting colours to highlight the trends and flat sections and is less sensitive to sudden fluctuations that create market noise. The Xena Corrected Average also ignores corrections, distinguishing them from trend reversals.

A Trading Strategy Using SMA, MACD, and a Stochastic Oscillator

In order to illustrate how MAs can be used, let’s examine a full-fledged trading strategy that uses the MA to determine the trend, a stochastic oscillator to identify periods of correction within the trend, and a MACD histogram that points to short-term reversals.

The strategy uses two MAs with averaging periods of 20 days (short-term) and 150 days (long-term) to identify price-level shifts. The market is bullish when the short-term MA is above the long-term MA and bearish when the short-term MA is below the long-term MA.

The second part of the trading strategy uses a stochastic oscillator to identify corrections. A stochastic oscillator with a range of values from 0–100 is a perfect indicator of short-term retracements and rebounds. Readings under 20 signal that the market conditions are oversold, while readings above 80 point to overbought conditions.

The MACD histogram is used to identify momentum reversals. It measures the difference between the basic MACD and its signal line. The indicator’s value is positive when the MACD is located above the signal line and negative when the MACD passes below the signal line. The MACD histogram is positive when the price is growing and negative when the price is going down.

A “buy” signal is generated when:

  1. The moving averages show a bullish shift and the short-term SMA passes above the long-term SMA.
  2. The stochastic oscillator gives a reading below 20, signalling a retracement.
  3. The MACD histogram moves to positive territory, signalling a rise after the retracement.

A “sell” signal is generated when:

  1. The moving averages show a bearish shift, with the short-term SMA passing below the long-term SMA.
  2. The stochastic oscillator gives a reading above 80, signalling a rebound.
  3. The MACD histogram moves to negative territory, signalling a fall after the rebound.

The strategy described above allows one to trade with the trends. Moreover, it is designed to identify good trading opportunities with an optimal risk–profit ratio. The moving average identifies the trend, be it bullish or bearish. The stochastic oscillator identifies retracements during a bullish trend and rebounds within a bearish trend. The MACD histogram warns of the end of a retracement or a rebound.

All the materials published on this website are provided for informational purposes only. They do not constitute an offer to buy or sell any assets and must not be viewed as trading or investment advice.