  # Moving Averages A Comprehensive Guide for Trend Analysis in Stock Trading

We have all become familiar with averages in school; moving averages is an add-on. It serves as a trend indicator and is popular due to its efficacy and simplicity. Before studying this concept further, let us quickly remember how to calculate them.

Let us assume that 5 people are basking under the sun along with chilled bottled drinks. All of them consume several drinks. Let’s assume this was the final total:

Assuming a 6th person walks into a room lined with 29 bottles of beverages, it is simple to estimate the approximate number of bottles each individual has consumed by dividing the total by the number of people present.

In this case, it would be:

=29/5

= 5.8 bottles per person

So, the average here acts as a pointer to give us an idea of how many bottles each individual had. Certainly, some would have consumed more or less than that – Person E had 8, while Person D only had 3, respectively surpassing and missing the mark of 5.8 bottles.

It is thus clear that the average is merely an estimation and therefore should not be taken as exact.

To obtain the 5-day average closing price of ITC Limited, the following formula can be applied: add together the last 5 trading session’s closing prices, and then divide by 5.

= 1719.75 / 5

= 343.95

The mean closing price of ITC over the last 5 market days is 343.95.

– The ‘moving’ average (also referred to as the simple moving average)

One may want to compute the average closing price of Marico Limited for the latest five days. The information is as follows:

= 1212.3/ 5

= 242.5

The average closing price of Marico over the last 5 trading days is 242.5

We will now use the date range from 22nd to 28th July in order to work out the average. 21st should be removed since it does not fit our aim of calculating a 5-day average.

= 1223.3/ 5

= 244.66

The average closing price of Marico for the past five days of trading equals 244.66.

As you can observe, we have taken into account the latest figures from 28th July to calculate the 5-day average. Subsequently, the 29th data will replace the 22nd, while on the 30th, data from the 23rd will be removed and replaced with data from the 30th. And so the cycle continues.

To calculate the most recent 5-day average, we are taking the newest data point and leaving out the oldest one. This is what gives it the name “moving” average!

For this example, the moving average is calculated based mainly on closing prices. However, other terms like high, low and open may also be used. Most traders and investors prefer to work with closing prices as these show how the market finished for that particular period.

Moving averages can be calculated for a variety of time frames, ranging from minutes and hours to years. The charting software of your choice can provide you with a range of options to suit your needs.

For those of you familiar with Microsoft Excel, please take a look at this screenshot. Here we see how the average formula works; observe how the cell reference shifts to include the most recent data points and eliminate the oldest ones.

It is clear that the moving average shifts in correspondence with the closing price. As calculated, this specific type of average is referred to as ‘Simple Moving Average’ (SMA). In our case, due to calculating it with the last 5 days of data, it is more specifically known as 5-Day SMA.

The averages from the designated period are joined to form a smooth curving line referred to as the moving average line, and it continuously changes as time passes.

I have plotted a 5-day Simple Moving Average over ACC’s candlestick chart, as shown below.

What is the Exponential Moving Average, and how can it be used?  I will soon introduce an easy-to-use trading system based on moving averages. Before that, let us take a quick look at the EMA.

The exponential moving average

Take into account the data points used in this example.

When we calculate the average of all the numbers, it presumes that each data point is of equal importance – that the data on 22nd July is as vital as on 28th July. Nevertheless, this may not be true when dealing with markets.

Remember the basic assumption of technical analysis – markets compensate for everything. This implies that the latest price you observe (on 28th July) takes into account all available and latent data. It is inferred then that the cost on the 28th is more authoritative than the one on the 25th.

Weightage given to data points should be based on the recency of their entry, with 28th July’s data having the highest priority, followed by 25th July and 24th July in descending order.

I have achieved this by scaling the data points according to their recentness, with the most recent having the greatest emphasis and the oldest barely considered.

The average of this scaled set of figures yields the Exponential Moving Average (EMA). We will focus on the use of this calculation, as opposed to its formula, since most specialized analytical software allows one to instantly place it onto prices.

This chart of Cipla Ltd. displays a 50-day Simple Moving Average (black) and Exponential Moving Average (red). We can observe that the EMA is more sensitive to the closing price and generally sticks closer to it.

EMA is noted for being able to react more quickly to market prices due to its emphasis on the latest data points. This assists traders in making decisions at a much faster rate, which explains why many prefer EMA over SMA.