moving average indicator

Tuesday, December 22, 2009


The moving average is one of the most widely used technical indicators because it is versatile and easily constructed. It serves as a device to follow trends in the movement of a currency (or stock). Its purpose is to identify and signal to a technical trader that a new trend, a sustained movement either up or down in the currency, has begun or that an old trend has ended or reversed. The reason trends are easier to see using a moving average is that it acts to smooth the volatility inherent in looking at the price action alone to recognize trends. Overlapped with the price action the moving average produces buy and sell signals to the analyst or trader. The signals have a lag to market conditions, therefore a moving average is a trend following indicator.
The solid red line presented in figure 1 is a 21 period, simple moving average of the Euro in relation to the US Dollar. The period being considered is 30 minutes, which means that every candle represents 30 minutes worth of price data. The figure shows roughly two full days of price movement for the EUR/USD pair. The mechanics of periods and how a moving average is constructed comes next.

The moving average is, obviously, an average. A trader can choose how many periods (measured in minutes, hours, days, weeks, etc.) the moving average should consider. The most common is the 21 day moving average, but there are advantages and disadvantages to using longer or shorter time periods, which we will get to in just a minute.

In order to calculate, as an example, the 10 day (here the period is 10 and measured in days) moving average, one adds the last 10 days' closing prices and divides that sum by 10, the number of days, to find an average. The reason it is a moving average is that the indicator is interested in the last 10 days' data. At the beginning of a new trading day, to compute the new 10 day moving average one uses yesterday’s data as the latest entry and discards the data from 11 days ago, which is no longer relevant to the computation. In this way the last and first data points are changing and the average is constantly updating itself.

Variations of Moving Averages

There are criticisms of using a simple moving average, which is the mathematical process described above. Mainly, the most recent day’s data is not given more weight in the moving average. Some analysts prefer to give more weight to the most recent data and the simple, also known as arithmetic, moving average does not factor this in. In order to accommodate these concerns some analysts employ a linearly weighted moving average. In a 10 day moving average the 10th day's data (the most recent) would be multiplied by 10, the 9th day’s data by 9, the 8th day’s by 8, and so on. This alleviates the weighting problem, as the most recent data takes dominance. A second criticism is that a moving average does not include all of the data in the life of the instrument. The solution is to this problem is to use the exponentially smoothed moving average. This type of moving average takes into consideration all past data.

Exponentially Smoothed Moving Average

The formula for an exponential moving average is:
EMA(current) = ( (Price(current) - EMA(prev) ) x Multiplier) + EMA(prev)

The exponential moving average (EMA) comes in two varieties because there are two different ways to achieve the multiplier parameter in the formula above.

  • One variety is a percentage based EMA which is calculated using a specified percentage for the multiplier; however much weight one wants to give the last day’s change.
  • The second kind of EMA uses the period specified for the average in a formula to calculate the multiplier.

This period based EMA multiplier is computed with the following formula:
2/(1+N), where N is the period.

A 10 day moving average will have a multiplier of:
2/(1+10) = .1818 or 18.18%.
A 200 day moving average will have a multiplier of:
2/(1+200) = .00995 or 9.95%

An EMA will take into account all the data of the instrument; however as is seen from the above examples the multiplier is larger for shorter time periods and so the older data’s significance is diminished more in those cases.
In the black circles it is apparent that the Exponential Moving Average hugs the actual price line more closely than the Simple Moving Average. It is quicker to respond to reversals in the trends. That is because the more recent data is represented stronger in the EMA and it can adjust to these changes quickly.

Which moving average is better? The EMA is more sensitive and better for shorter time periods as it can capture changes quicker. The tradeoff is between sensitivity and reliability. Since EMA respond quicker to short-term situations, they may also be prone to giving false signals. Simple moving averages work well for longer-term situations that do not require a lot of sensitivity.

The solid red line presented in figure 1 is a 21 period, simple moving average of the Euro in relation to the US Dollar. The period being considered is 30 minutes, which means that every candle represents 30 minutes worth of price data. The figure shows roughly two full days of price movement for the EUR/USD pair. The mechanics of periods and how a moving average is constructed comes next.

0 comments:

Post a Comment

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP