Technical Analysis: Moving Averages

Moving averages are one of the most commonly used technical analysis techniques for investing and trading in shares. Learn more about moving averages in this article.

If you are familiar with the stock market, you’d be aware that stock prices fluctuate every second. If these fluctuations are plotted in the form of a chart for technical analysis purposes, one will come up with nothing more than a clutter of scattered data points. This is where moving averages step in. To smooth a stock’s price movements on its technical chart, analysts plot an average price of the stock on the charts – this average could be day’s average, or average of day’s high, day’s low, or day’s opening or closing price. Technical chartists observe the moving average (MA) over a period of time, which can be as low as 15 days or as high as 200 days. One of the several theories is then applied to the MA curves on the chart to predict future price trends – for example, if a recent short-term (say, 15 days) MA crosses the long-term (say, 50 days) MA then it spells an upward trend, but if it’s the other way round then it’s a bearish signal.

Moving averages are the most common, most popular and the simplest of all technical indicators, and once mastered they that can help you identify profitable trades. In fact, many other technical indicators are based on them. So, how do you spot a profitable trade using moving averages? For that you have to understand Simple Moving Averages and Exponential Moving Averages and then head to our next chapter, MACD (Moving Averages Convergence/Divergence).

Simple Moving Averages

A simple moving average (SMA) is obtained by adding the market price of a security over a specified number of trading days, and then dividing it by the total number of trading days. The “market price” mentioned above could be the opening, closing, average, high or low price of the security – it depends on the preference of the technical analyst. However, many technical analysts prefer to take the closing price for calculating simple moving averages.

Take the following hypothetical example:

Date Closing price of XYZ Ltd. (in GBP)
January 2 10
January 3 12
January 4 9
January 5 11
January 6 13
January 9 14
January 10 13
January 11 15
January 12 16
January 13 18
January 16 16

Here’s how a 5-day SMA of XYZ Ltd. is calculated:

For January 9, the SMA is 10 + 12 + 9 + 11 + 13 = 55  5 = 11
For January 10, the SMA is 12 + 9 + 11 + 13 + 14 = 59  5 = 11.80
For January 11, the SMA is 9 + 11 + 13 + 14 + 13 = 60  5 = 12
For January 12, the SMA is 11 + 13 + 14 + 13 + 15 = 66  5 = 13.20
For January 13, the SMA is 13 + 14 + 13 + 15 + 16 = 71  5 = 14.20
For January 16, the SMA is 14 + 13 + 15 + 16 + 18 = 76  5 = 15.20

So you see, calculation of SMA is a continuous process and should be calculated and plotted for each day. For the 5-day SMA above, we averaged the past 5 closing prices; for a 50-day SMA we need to average the closing prices for the past 50 days, and so on. Of course, you don’t have to do this exercise manually – there is technical analysis software to help you out.

The SMA values are plotted daily on the chart, and when joined they form a curve called the SMA line. So, if you plot the 50-day, 100-day or 200-day SMA data points and join them, the ensuing curves will be called 50-day SMA line, 100-day SMA line or 200-day SMA line, respectively.

Figure one shows a daily chart for Wachovia Bank with 50 day and 200 day moving averages plotted.

Moving averages example

Exponential Moving Averages

If you have followed the SMA concept, you’d have realized that it takes the previous days’ market prices into consideration. That is why it is termed as a “lagging indicator”. Many technical analysts would like the moving average to be more representative of the current prices – and Exponential Moving Averages (EMAs), also referred to as Exponentially Weighted Moving Averages, help them do precisely that by including in the calculations a weight factor that lends the current price carry more weight compared to the previous day’s price. EMAs thus help cut the time “lag” factor in the MA curve. The shorter the EMA period, the higher is the weight the current price carries in the MA curve, and vice versa.

EMAs are considered more relevant than SMAs, and the MA curve obtained using EMAs is more in sync with the current price trends. Though calculating EMAs is much tougher than SMAs, it is not a deterrent as you don’t have to work on the calculations yourself – appropriate technical chart software makes the job very simple.

And this is how the current EMA is calculated:

Current EMA = [(Current price – Previous Day’s EMA) × Weight factor W)] + Previous Day’s EMA

The weight factor is given by

W = 2 divide by (1 + N)

where N denotes the number of days for which the EMA is to be calculated. Let’s illustrate this by calculating the 5-day EMAs for the period January 10–16 for the previous example of XYZ Ltd. using the above two equations and the following table (In these calculations, the first Previous Day’s EMA is taken as the SMA itself):

Date Closing price of XYZ Ltd. (in GBP) 5-day SMA Previous Day’s 5-day EMA Current 5-Day EMA
January 2 10
January 3 12
January 4 9
January 5 11
January 6 13
January 9 14 11 11 12.00
January 10 13 11.8 12 12.33
January 11 15 12 12.33 13.22
January 12 16 13.2 13.22 14.15
January 13 18 14.2 14.15 15.43
January 16 16 15.2 15.43 15.62

For January 9, the Previous Day’s EMA = Previous Day’s SMA =11.
W = 2 divide by (1+ 5) = 1/3.

Hence, the current EMAs are as follows:

For January 9 = [(14 – 11) × (1/3)] + 11 = 12
For January 10 = [(13 – 12) × (1/3)] + 12 = 12.33
For January 11 = [(15 – 12.33) × (1/3)] + 12.33 = 13.22
For January 12 = [(16 – 13.22) × (1/3)] + 13.22 = 14.15
For January 13 = ([18 – 14.15] × (1/3)] + 14.15 = 15.43
For January 16 = ([16 – 15.43] × (1/3)] + 15.43 = 15.62

These current EMA values are presented in the last column of the above table. As you can see by comparing columns 2, 3 and 5 in this table, the EMAs are more truly representative of the current prices compared to the SMAs.

When to use SMA and when to use EMA?

Short-term traders/investors and day traders prefer to work with EMAs as they yield a moving averages curve that is more representative of the current market prices. Medium- and long-term investors can rely on either EMAs or SMAs, as they believe that market prices smoothen out over time (30-day and above).

Remember, an EMA curve gives out more signals, but these may sometimes turn out to be false, especially for very volatile stocks. On the other hand, SMA curves may not give a signal before it’s too late. Ultimately, which MA curve you follow depends on your trading strategy.

MA curves: conditions

  1. MA curves generally follow the prices and lag behind the current price. In this sense, they follow/lag behind the trend and hence must be used along with support and resistance levels to confirm the trend (up or down), and not for price prediction.
  2. If a stock behaves erratically over a long period of time, then do not use its MA curve to predict its trend.
  3. If a stock is very volatile or range-bound, then use a longer (50-day) MA curve to determine its trend. If a stock is already trending (up or down), then use a shorter MA curve (2 weeks).
  4. Popular MA curve lengths used are: 3 weeks, 50, 90, 150 and 200 days.
  5. You must experiment with MA curves to determine the length of the curve that reconciles with the stock behavior and your trading strategy.


Moving averages can be effective tools to identify and confirm trend, identify support and resistance levels, and develop trading systems. However, traders and investors should learn to identify securities that are suitable for analysis with moving averages and how this analysis should be applied. Usually, an assessment can be made with a visual examination of the price chart, but sometimes it will require a more detailed approach. The ADX, Average Directional Index, is one tool that can help identify securities that are trending and those that are not.

The advantages of using moving averages need to be weighed against the disadvantages. Moving averages are trend following, or lagging, indicators that will always be a step behind. This is not necessarily a bad thing though. After all, the trend is your friend and it is best to trade in the direction of the trend. Moving averages will help ensure that a trader is in line with the current trend. However, markets, stocks and securities spend a great deal of time in trading ranges, which render moving averages ineffective. Once in a trend, moving averages will keep you in, but also give late signals. Don’t expect to get out at the top and in at the bottom using moving averages. As with most tools of technical analysis, moving averages should not be used on their own, but in conjunction with other tools that complement them. Using moving averages to confirm other indicators and analysis can greatly enhance technical analysis.


  1. ramesh innaani 17th September 2008
  2. pradeep 30th July 2008

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.