Indicators are tools used by technical analysts to create, or confirm, buy and sell signals. Indicators became very popular with the advent of the computer. This is because all indicators are mathematically derived from chart data - price, volume and time. Many technical analysts even refer to indicator analysis as computer analysis. Like chart patterns, indicators attempt to give the trader an indication of what the market is thinking. Are they panic buying? Are they slowly accumulating the stock? Have they oversold the stock to 'ridiculous' levels? Are there too many short sells in the market who will panic to buy back stock if it begins to rise? If there is buying, is it in large blocks (professionals?) or in small amounts (the 'Mums and Dads'?) These are questions that all good traders will ask themselves before making a trade. Charting and the use of indicators help to find these answers.
In this lesson we examine one of the most common indicators - The Moving Average
One of the most common indicators is the moving average but even this relatively simple indicator has seen many variations over the years.
A moving average plots the average price of a stock over a specified number of trading sessions.
Moving Averages (MA's) are almost always calculated using the closing price for a trading session.
For example, the chart below shows a 5-day moving average over BHP.

The moving average for the chart was calculated as follows:
| Date | Closing Price | 5-day Moving Average |
| 27/9/01 | $8.57 | |
| 28/9/01 | $8.58 | |
| 1/10/01 | $8.79 | |
| 2/10/01 | $8.75 | |
| 3/10/01 | $8.84 | $8.706 |
| 4/10/01 | $8.96 | $8.784 |
| 5/10/01 | $9.24 | $8.916 |
| 8/10/01 | $8.84 | $8.926 |
| 9/10/01 | $8.95 | $8.966 |
| 10/10/01 | $8.87 | $8.972 |
| 11/10/01 | $9.24 | $9.028 |
The Moving Average for the last day was calculated by adding together the last day's closing price together with the previous 4 days closing prices and then dividing by 5.
i.e. ($9.24 + $8.87 + $8.95 + $8.84 + $9.24)/5 = $9.028
The second last days (10/10/01) moving average was calculated by adding together that day's closing price with the previous 4 days closing prices and dividing by 5.
i.e. ($8.87 + $8.95 + $8.84 + $9.24 + $8.96)/5 = $8.972
And so on....
The purpose of the moving average is to reduce 'noise', that is, to omit the sharp fluctuations that the stock may experience thereby allowing the technical analyst to examine if there is an underlying price trend. Using a 5 day moving average it could be seen in the previous example that the general price movement in BHP over the period of the analysis is upwards. BHP is in an uptrend (only in the last two weeks - our period of analysis). Herein lies the power of the moving average. It is able to detect trends.
When using a single moving average, a buy signal is generated when the stock crosses from below to above the moving average line. A sell signal is generated when the stock moves from above to below the moving average line.

For example, in the chart shown, buy signals are generated at B, D, F, H, J and L and sell signals are generated at A, C, E, G, I and K.
Usually, a chartist will wait for the stock to CLOSE above or below the moving average line before acting on its signal. This is the case in the example given.
Upon initial inspection, it would appear that the trader would be in and out of the stock very often and even then, not making much money before reversing the trade. There are numerous ways to combat this. One of them is to only act on the signal when the stock CLOSES above or below the moving average line (as in the example). Notice in the previous example, the buy signal was not given on the previous day to B. This is because the stock crossed the moving average but it did not close above it. Another type of filter would be to only act on the signal if the stock has spent more than one trading session above or below the moving average. For example, buy the stock if it closes for three days in row above the moving average. One more filter will be mentioned here and it is the most common - lengthen the period of the moving average. The reason the previous example gave so many signals was that the period of 5 days is very small. A period of 90 days (for example) would create a much smoother moving average and not give nearly so many trading signals.
A 5 day moving average has been given as the example as this can actually be read as a weekly moving average. A 20 or 21 day moving average is often used to find the monthly moving average. Psychologically, these two parameters are used as many investors, whether consciously or subconsciously use weeks and months as a time frame to transact shares. Also, the numbers 5 and 21 are believed to hold greater importance because they are also Fibonacci numbers, numbers that describe natural growth.
Generally, the longer the time frame of the moving average, the greater is its signal of trend and therefore trend change. This logic can be compared to probability theory where a more accurate prediction of probability can be gathered from a larger sample space (larger amount of data).
By combining both a 5 day moving average and a 21 day moving average, we are examining both a short term and medium term trend in a stock. By adding a 261 day (yearly) moving average, we can also see the long term trend in the stock. A very powerful buy/sell signal develops when all three of these trends begin to move in the same direction.

Starting with two moving averages, the 5 day and 21 day on a chart of Flight Centre, it can be seen that both moving averages cross each other at various intervals. These crossovers work in a similar fashion to the price crossover for the single moving average and act as the buy/sell trigger.
A buy signal is generated when the shorter term moving average crosses from below to above the longer term moving average.
A sell signal is generated when the shorter term moving average crosses from above to below the longer term moving average.
The chart shows when long and short positions would have been opened.
The crossover of the shorter period moving average (5 day), down and below the longer term moving average (21 day) at A and C, signaled a SELL.
The crossover of the shorter period moving average, up and above the longer term moving average at B, signaled a BUY.
The power of moving averages is in capturing the long trends. When a stock 'whipsaws' around (is trading in a range), the trader is going long and short at fairly regular intervals, taking a loss or very little profit each time.
Note that when using two moving averages, the trader is always long or short. In other words, if the trader is long, the trader will sell and then open a new short position to attempt to profit in the other direction. To prevent always being in the market, three moving averages can be used. In this type of analysis, the initial signal provides the close position signal (take profit or loss on trade) and the next signal provides the open position signal (buy or sell). Lets take the example of having a 5 day (short term moving average), a 10 day (medium term moving average) and a 20 day moving average (long term moving average).
A buy signal is generated when the medium term moving average crosses from below to above the long term moving average.
A sell of the long position signal (closing bought position) is generated when the short term moving average crosses from above to below the medium term moving average.
A short-sell signal (opening a short position) is generated when the medium term moving average crosses from above to below the long term moving average.
A buy of the short position signal (closing sold position) is generated when the short term moving average crosses from below to above the medium term moving average.

The BHP chart shows various buy/sell to open/close signals when using three moving averages. The short term moving average is shown in red, medium is shown in blue and the long term moving average is shown in green (5, 10 and 20 day moving averages respectively).
The crossover at A is of the short term moving average crossing from above to below the medium term moving average. This means that any open long positions should be bought back (close long positions).
The crossover at B is of the short term moving average moving from below to above the medium term moving average. This tells us to buy any short positions we may have. As the previous signal at A told us to sell any long positions, we are already neutral and we should do nothing.
The crossover at C is of the short term moving average moving from below to above the long term moving average. There is no meaning for this crossover so we still remain neutral.
The crossover at D is of the medium term moving average crossing from below to above the long term moving average. This tells us to BUY the stock (open long positions).
The crossover at E is of the short term average crossing from above to below the medium term moving average. This tells us to close any long positions. In this case we will be selling our bought position very soon after opening the bought position (but at least it's for a small profit!)
The crossover at F is of the short term moving average moving from below to above the medium term moving average. This tells us to buy any short positions we may have. As we are currently neutral, this signal does not mean anything.
The crossover at G is of the short term moving average crossing from above to below the medium term moving average. This tells us to close any long positions we may have. Again, as we are neutral, the signal is meaningless.
The crossover at H is of the short term moving average crossing from above to below the long term moving average. This does not give any signal.
The crossover at I is of the medium term moving average crossing from above to below the long term moving average. This tells us to short - SELL the stock, that is, open a short position.
The crossover at J is of the short term moving average moving from below to above the medium term moving average. This tells us to close any short positions we may have. As we are currently short the stock because of the signal given to us at I, we buy back the stock and again make a small profit.
The crossover at K is of the short term moving average moving from below to above the long term moving average. This does not give any signal.
The crossover at L is of the medium term average crossing from below to above the long term moving average. This tells us to BUY the stock, that is, open a bought position.

The logic behind the multiple moving averages is that a price has been found where the long term investors, medium term investors/traders and short term traders have found a point at which they are willing to buy/sell stock. If all three groups of market participants are doing the same thing at the same time, it is more than likely that the market will react strongly to that action. In the BHP example, it could be seen that the short term moving average had been heading upwards since about the 26 September. The medium term moving average had been moving up since around the 3 October and the buy signal was given just as the long term moving average began to move upwards. This can be loosely translated to, the short term buyers began buying first, then came the medium term buyers, then the long term buyers. The end result was all three moving averages heading upwards with all three groups participating in the price rise.
Technical analysts have developed variations on the Moving Average, notably, the weighted Moving Average and the Exponential Moving Average.
With a simple moving average, just as much importance is given to the last day that makes up the average as the first day. For example, say we have a 200 day moving average that is calculated by adding the closing price of the day 200 trading sessions ago, and all the days up to the previous sessions closing price. Should the closing price 200 days ago be just as important to the trend as yesterday's closing price? Many would argue that it is not and more importance should be given to the most recent data. This is what the Weighted Moving Average sets out to do. It is calculated by multiplying each of the days making up the moving average data by a weighting multiple, with the most recent data having a greater multiple.
Again we'll use the BHP example but add a new column for the weighting factor.
| Date | Weighting Factor | Closing Price | Closing Price × Weighting Factor | 5-day Weighted Moving Average |
| 5/10/01 | 1 | $9.24 | $9.24 | |
| 8/10/01 | 2 | $8.84 | $17.68 | |
| 9/10/01 | 3 | $8.95 | $26.85 | |
| 10/10/01 | 4 | $8.87 | $35.48 | |
| 11/10/01 | 5 | $9.24 | $46.20 | $9.03 |
| Total | 15 | $135.45 |
To calculate the weighted moving average, the closing price for each of the past 5 days (in this example) is multiplied by the weighting factor. A weighting factor of 5 (again, only for this example) is assigned to the last days closing price. The day before is assigned a weighting factor of 4 and the day before that, a weighting factor of 3, and so on until the weighting factor of 1 is assigned. These totals can be found in the column headed 'closing price * weighting factor'. The sum (total) of this column ($135.45) is then divided by the sum of the weighting factors (15). This gives the weighted moving average of $9.03 for the 11/10/01.
It has probably become clear from this example why indicators are often classified under 'computer analysis'. The same procedure for calculating the single day's weighted average must be repeated for every day on the chart. If the data for the chart under examination is for 5 years and we are using a 260-day moving average, it is completely impractical to calculate the indicator 'by hand'.
The weighted moving average can be used for analysis in the exactly the same way as the simple moving average. That is, the principle of filters and multiple moving averages can be used in the same way by substituting the simple moving average with the weighted moving average.
The weighted moving average is simply assigned a number of the period of the moving average (5 in the previous example) to the last day and assigned weighting factors in increments of -1 for the previous days. Another type of weighted moving average is the exponential moving average which assigns weighting factors a little more scientifically. The exponential moving average assigns a percentage of the last day's closing price to a percentage of the previous days moving average value.
Mathematically:

where:

For example, when the moving average period is 5, then:

so:

A full example and table are not given here, as the calculations are complicated. The important thing is to understand how the exponential moving average is calculated (a percentage weighting is given to the previous days data).
Exponential moving averages are used in analysis in the exact manner as the weighted moving average and the simple moving average.

This is the BHP chart used in the original moving average example. What we can see here is how the data varies based on the type of moving average being used.