Home Indicators Trending Technical Indicators – The Moving Average

Technical Indicators – The Moving Average


What is a Moving Average?

An average is the mean value of a set of values. it is computed adding all values and dividing by the number of elements in the set. An average takes a determined number of prices and averages them. When this is done for every new price we have a moving average.

The usual price used to calculate it is the Close price of a bar or candlestick chart, although chart packages allow the trader to choose other values as input for this indicator.  Other prices sometimes are used are the High, the Low. or a weighted value of the bar.

In finance, the usual way is to compute the average using the closing prices over a period. The period is a parameter which can be set according to the needs of the trader. A moving average behaves as a filter to take out the small changes occurring from bar to bar. Changes that are considered the noise of the market.

Moving averages can be applied to all chart types and time-frames. In the case of an hourly chart, a 10-period moving average computes the closing price of the last 10 hours. On a daily chart, it will compute the average price of the last 10 days. The Following chart shows typical Moving Average periods over the EURUSD daily chart.

Fig 1 -9, 30, 100 and 200-period Simple Moving Averages on the EURUSD Daily Chart

What do Moving Averages Tell?

By observing a Moving Average the trader can make conclusions about the current state of this particular market.  For instance, on the chart above we see the price is moving below its 200-day average. This indicates the pair is in a bearish trend. This Bearish trend is also indicated by the downward slope of this average.  We see also that before the last leg up, the moving averages are aligned from top to bottom: 200-day MA is above the 100-day MA which is above the 20-day MA and this one is above the 9-day MA. This kind of organized state is caused by a continuous downward trend. When the trend is upward we tend to see a similar organisation of the averages, but upside down: 200-day MA is below, 100-day follows above it, and so on until the 9-day MA.

That made traders think that the cross of a short-period MA over a longer-period MA was a signal the market was turning up. Conversely, the bearish move could be spotted when the short-term MA crosses under the long-term MA.  Since moving averages are computationally friendly The MA Crossover System was one of the first computerised systems ever developed. Today is a loser as described here, so don’t bother to try it.

Types of Moving Averages

The moving average described above is called “Simple Moving Average” or SMA. It is Simple because it computes the simple average, giving the same status or weight to every price in the period. The main issue with this average type is that there is a lag between the response of the average and the price action which makes the trader unhappy about the amount of profit lost while the confirmation occurs. Also, since the lag can be large, when the trader executes the trade maybe it’s too late and the price retraces its track making the trader lose money.

Thus, people started wondering how to improve upon the basic average. The basic idea of the following moving average classes is to give different weight to recent prices over the older ones to create a more responsive average.

Exponential Moving Average (EMA)

Exponential moving averages came as an easy improvement of a simple moving average. Its formula is:

EMAt= a x pt  + (1-a) x EMAt-1

Where pt is the current price and EMAt-1 is the previous EMA price.

a is a coefficient between 0 and 1 that regulates the degree of weighting or decrease speed.

Triangular Moving Average  (TMA)

To implement a Triangular-weighted Moving Average on an n period the weights increase linearly from the first element to Element n/2 and then decreases linearly to the last element.

Weighted Moving Average (WMA)

Front-weighted Moving average is a more general class of weighted average where the value is computed by a general function:

WVG = f(w,n)

where f(w,n) is any formula which returns a value computed over a period of length n of the price set.

This formula gives room for any type of weighting including the exponential and triangular versions.

Linear Moving Regression Curve (LR)

This type of average is really the representation of a linear regression of the elements on the period. It is much more responsive to changes in the price. Some traders use a 10-30 Linear Regression Crossover as trading signals.

Fig 2 – Moving Average Types on the EURUSD Daily Chart

The figure above shows different 30-period moving average types applied to the EURUSD daily chart. We see that mostly they follow the same path, but some are smoother than others.

Determining the Trend Using Moving Averages

Using a Single Moving Average

To detect a trend using a single moving average we select the period of it about half the period of the market cycles. Usually, a 30 bar period is adequate. If, as in the above case, is not, that means the price travels in a shorter-period price channel and you need to lower the averaged period or shift to a shorter time-frame such as 4H or 2H.

Fig 3 – Determining the Trend Using One Moving Average

Method 1 – The price crossing over or under the MA

The trend direction is decided upon the price being above or below the average line. If the price is over the MA, the current trend is bullish; if it is below the price, the trend is bearish. Therefore, the crossing of the price over or under the average trigger trade signals or act as a filter allowing only long or short positions. As is, this system does not detect sideways movements too well.

Method 2 – The MA Slope Points Upwards or Downwards

This method relies on a derivative of the average and looks at its slope as a hint of the future direction of prices.

Using a Two Moving Averages
Method 1 – MA Crossovers

This method is similar to the price crossover on the Single MA method. this time a short-period MA crossing over or under determines if the future trend is bullish or bearish.

Fig 4 –  Two Moving Average Crossovers

This method uses the fast (shorter) MA to eliminate the inherent price noise and avoid false price crosses. Blue circles show places where the price crossed over and under the average but were false signals due to price noise.

An additional measure can be applied to this signal to make it more consistent: Take the trade when both averages point in the same direction.

Using a Three Moving Averages 

There are many ways to define a trading strategy using three moving averages. The most usual is to use short, mid and long-period moving averages.  When mid-MA is above the long-MA and the short-MA crosses the mid-MA over a Buy signal is triggered. The same pattern to the downside triggers a sell-short position.

This configuration is said to avoid periods of sideways action because during these periods the MA crossovers happen at the wrong side of the long-MA forbidding the trade. The downside is that potentially good trades are forbidden for the sake of higher per cent winners. The chart below shows the case of a 100-day slow average that allows two good trades while filters out three potentially good short-term trades. Of course, it also filters out the noisy sideways channel at the right side of the chart.

Fig 5 –  Three Moving Average Crossover

Moving Average Convergence-Divergence MACD

MACD is discussed here, but for the sake of completeness, lets present here a small explanation of the method.

The MACD indicator is created by the subtraction of two moving averages. This subtraction brings up a nice property that the Averages lose: Price syncing. As we already know, averages lag the price, but what happens when we subtract two averages? their lags are also subtracted. The end result is that most of the lag gets wiped out. As a consequence, the MACD signals lead the MA crossover signals.

Fig 6 –   Trend Determination using an Unconventional 30-60 MACD

Most trades do not touch the standard 23-26-9 MACD parameters, but that is a pity (for them). The subtractive property works nicely using longer periods with the added feature that the wrong MACD signal crossovers mostly disappear, while the right signals do not degrade. Above you can see that the 30-60-9 MACD give signals in advance of the 10-30 MA crossovers while being much less noisy.

The MACD can be used to assess the trend and use price action or another cyclic indicator such as the Stochastics or Williams Percent R to catch the entry at the end of a correction.

Moving Averages as Supports and Resistances of the Price

The moving average can be used as dynamic support or resistance line, in the way trendlines are used. The fact that moving averages are computer friendly makes this king of strategies easier to backtest than straight lines.

The basic idea is similar to a linear trend line. The price moves in an impulse, and, then retraces back to its average “fair” price. When the price begins to move away from the moving average again, it signals that the average was not pierced and the current trend is still valid.

Fig 7 –   Moving Averages acting as Supports and Resistances of Prices

As happens with linear trend lines, moving averages have false breakouts, as seen on the above chart, but using appropriate price action techniques rewards outweigh risks.




Please enter your comment!
Please enter your name here