Moving Averages

Moving averages provide an objective measure of trend direction by smoothing the price data. Normally calculated using closing prices, moving averages can also be used on median, typical and weighted closing prices as well as other indicators (see Indicator Smoothing).

Time Frames

Shorter length moving averages (MA's for short) are more sensitive and identify new trends earlier, but also give more false alarms. Longer moving averages are more reliable but only pick up the big trends.

It is best to use a moving average that is half the length of the cycle that you are tracking. If the peak-to-peak cycle length is roughly 30 days then a 15 day MA is appropriate. If 20 days, then a 10 day MA is appropriate. You will, however, often find traders using 14 and 9 day MA's for the above cycles in the hope that they will generate signals slightly ahead of the market.

Cycles vary in length over time - always check that the moving average you are using is still appropriate.

Trading Signals

Click on the following links for details of the various moving average trading systems:

Single Moving Average
Compares price to a single moving average. The system is often used with filters.

Filters
Filters are used to eliminate uncertain signals by objectively measuring when price has crossed the moving average.

Moving Average Directional Filter
Uses the slope of the moving average as a filter.

Two Moving Averages
Uses a fast moving average instead of a filter.

Three Moving Averages
The third moving average identifies when price is ranging.

Multiple Moving Averages
A series of five fast moving averages and five slow moving averages.

Construction

Simple Moving Average

The simple moving average (or SMA) is the easiest to construct. A 5 day SMA takes the sum of the last 5 days prices and divides by 5. Easy but not always accurate: the indicator has a tendency to "bark twice". Consider this example:

Day

1 2 3 4 5 6 7 8 9

Price ($)

16 17 17 10 17 18 17 17 17

5 Day SMA

        15.4 15.8 15.8 15.8 17.2

You can see that on day 9 there is a big step in the simple moving average, but price has been constant at $17. This distortion is caused by the low price on day 4 - dropped from the SMA on day 9.

Exponential Moving Average

To calculate an exponential moving average (EMA): 

If we recalculate the earlier table we see that the exponential moving average presents a far smoother trend:

Day

1 2 3 4 5 6 7 8 9

Price ($)

16 17 17 10 17 18 17 17 17

33.3% (or 1/3) EMA

    16.7 14.4 15.3 16.2 16.5 16.6 16.8

EMA %

EMA% is the weighting attached to the current days value:

Exponential Moving Average Time Periods

How to calculate an EMA% for a selected time period (the indicator panel performs this calculation automatically):

EMA% = 2/(n + 1)      where n is the number of days

Example: The EMA% for 5 days is   2/(5 days +1) = 33.3% 

Weighted Moving Average

A Weighted moving average (WMA) attaches greater weight to the most recent data. The weighting is calculated from the sum of days.

Example: For a 5-day weighted moving average the Sum of Days is 1+2+3+4+5 = 15
The weighting is shown below: 

Day

1 2 3 4 5

Price ($)

16 17 17 10 17

Weighting

1/15 2/15 3/15 4/15 5/15

Weighted value

1.07 2.27 3.40 2.67 5.67

5 Day WMA

        15.07

Weighted values are calculated by multiplying today's price by 5/15, yesterday by 4/15, and so on. The weighted moving average is the sum of the 5 weighted values.

Setup

Indicator Panel shows how to set up moving averages. 

The default setting is a 21 day exponential moving average. Edit Indicator Settings explains how to alter the default settings.


Related Topics

Single Moving Average

A simple moving average system, often combined with filters for greater effectiveness...


Two Moving Averages

Fast and slow moving averages provide a powerful measure of trend strength and direction...


Three Moving Averages

A more sophisticated system that uses a third moving average to identify ranging markets...


MACD

MACD is a powerful refinement of the two moving averages system, providing reliable signals of trend changes...


Median Price

Measures the mid-point of the trading range for each period...


Typical Price

Typical price is a useful filter for moving average systems, approximating average price...


Weighted Close

A simple but effective filter for moving average systems...

External Links

Technical Charting Archives : February 23, 2001
 

Applied Materials analyzed with a simple moving average cross over system


Technical Charting Archives : March 02, 2001
 

Applied Materials analyzed with a volume adjusted moving average cross over system


Technical Charting Archives : March 09, 2001
 

Our Applied Materials analysis analyzed


Technical Charting Archives : March 16, 2001
 

Our AMAT Aanalysis Analyzed Further


Technical Charting Archives : March 23, 2001
 

AMAT Analyzed Again


Technical Charting Archives : March 30, 2001
 

A moving average crossover system by J. A. SAPP


Moving Averages

Moving Averages - Part 2 -- Chart School
 

The moving average is one of the most popular and easy to use tools available to the technical analyst. By using an average of prices, moving averages smooth a data series and make it easier to spot trends.


Moving Averages - Part 1 -- Chart School
 

The moving average is one of the most popular and easy to use tools available to the technical analyst. By using an average of prices, moving averages smooth a data series and make it easier to spot trends.


Introduction, Moving Averages - Technical Analysis from A to Z
 

Introduction, Moving Averages - Steve Achelis' best-selling book, Technical Analysis from A to Z


Moving Averages - Technical Analysis from A to Z
 

Moving Averages - Steve Achelis' best-selling book, Technical Analysis from A to Z