Moneycontrol Be a Pro
Get App
Last Updated : Sep 16, 2018 10:26 AM IST | Source:

Technical Classroom: How to use simple moving average as an investment strategy?

Shabbir Kayyumi of Narnolia Financial Advisors said moving averages is a strong indicator used in technical analysis

Moneycontrol Contributor @moneycontrolcom

Shabbir Kayyumi

Narnolia Financial Advisors

Moving averages is a strong indicator used in technical analysis. It is frequently used as a one of the popular indicators to determine the trend of underlying financial instrument. The 200-day simple moving average is considered a key indicator even by long term investors.

What is a moving average?

The simplest form of a moving average, appropriately known as a simple moving average (SMA), is calculated by taking the arithmetic mean of a given set of values.


Moving averages are always represented on the price chart. Moving averages can be built for any period of time, whether 5 minutes, 1 minutes (on an intraday chart), days, weeks or months.

Construction of simple moving average

Simple moving average (SMA) is a moving average which is calculated by adding the closing price of security prices for the last n-periods and dividing it by the total number of time periods. SMA is a technical indicator that is represented by a line and it is directly plotted on the security price. As per the choice of the trader, the periods can be changed in the SMA indicator.

Example: Calculation of 5 day SMA for the Nifty
1) Sum total=Add the last 5 days closing price of the security

2) 5 day SMA= Divide sum total by the n period (n=5 in this example)

Calculation for 5 day SMA:
(C5+C4+C3+C2+C2+C1)/5; Where C=closing price of a scrip

C5= Closing prices 5 days ago.

If a trader wishes to see a 20-day average instead, the same type of calculation would be made, but it would include the prices over the past 20 days.

Image7150920185 day simple moving average calculation for the Nifty

Different types of SMA

In general, moving averages are constructed from closing data of stocks, but may be constructed from the following price data sessions:

1. Moving averages from closing prices: For its construction, chart is prepared by taken only the closing prices of the session whether daily, weekly, monthly, etc.

2. Moving averages from high prices: Taking into account the high prices of each session for its construction.

Image815092018Different types of simple moving averages (Nifty)

3. Moving averages from low prices: Taking into account the low prices for each session for its construction.

4. Moving averages from pivot points: Pivot points are calculated as p= (h+l+c)/3, and it is used as an important reference point in technical analysis. However pivot points can also be used to construct moving averages.

There are many other parameters like open, volume, RSI, stochastic etc that are used regularly used to construct popular moving averages.

Role of SMA in determining market trends
Moving average can be utilised to determine trends. For instance, if the moving average is rising, then the trend is considered up. On the other hand, if the moving average is falling, the trend is considered to be down. The following method is also useful to determine trend in an easier way and it can be clubbed with rising and falling SMA technique.

Image915092018Trend with SMA (Sensex)

•> For shorter-term SMA, we can use 5, 13 and 20 day time periods. Whenever prices are closing above the 20 day SMA, it is generally considered that the short term trend is up and a close below the 20 day SMA, we say the short term trend is down.
•> For the medium term SMA, we can use 34, 50 and 65 day time periods. Whenever prices close above the 50 day SMA, the mid-term trend is considered to be up and vice-versa.

•> For the longer term, 100 and 200 day time periods can be used. Whenever prices close above the 200 day SMA, the long term trend is considered to be UP and vice-versa.

In the above example, the short, mid-and long term trend for the Sensex on September 3 are up. All SMAs are rising, hence one should look at this as a buying opportunity.

Moving average crossover
•> When the shorter moving average crosses above the long term moving average, it shows the trend is shifting up and creates a buy signal.
•> When shorter moving average crosses below the long term moving average, it shows the trend is shifting down and creates sell signal.

Image1015092018Buy and sell signal with SMA (Bank Nifty)

As indicated in the above chart, whenever the 8 DMA crosses the 20 DMA from above it generates a sell signal as shown with the red arrow. Similarly, whenever the 8 DMA crosses the 20 DMA from below, it generates a bullish signal shown by the green arrow.

A bullish crossover of the 50 and 200 DMA is called a golden crossover, which is the most popular crossover among traders. A bearish crossover of the 50 and 200 DMA is called a death crossover, which is considered as a strong bearish signal.

The simplicity of this indicator makes it popular among traders. Moving average does not work well in choppy or sideways market conditions. It is advisable to not to use shorter or medium term moving averages during that period.

Moving average as a support and resistance
Moving averages helps in identifying the support and resistance levels of a security. It is also called as curving trendline because of this property. Whenever prices approach SMA from above, it provide support and vice versa.

Image1115092018SMA providing support and resistance (WTI Crude Oil)

In the example above, the 200 DMA has given support to prices almost 5 times. One more important point to observe here is that SMA works very well with commodities too. We can even use the buy signal whenever prices close above the SMA and sell signal when prices decisively close below the SMA. The most popular moving average used by traders is the 200 DMA. In fact, most portfolio managers uses this technique on a regular basis.

•> Every indicator has different drawbacks but it is also true that moving averages work very well if they are combined with other indicators and oscillators like RSI and stochastic.
•> Since basic derivation of a SMA is based on simple arithmetic average of n-period, they are a laggard by nature and provide delayed signals compared to price action or lead indicators.

•> A moving average as represented by a line is movable as it changes or moves with the data to be added for each trading day.
•> The moving average crossover is one of the best technical analysis tools when used correctly. This tool should be used in conjunction with other technical tools.
•> Moving averages throw up many trading signals (buy and sell) during a sideways market. Most of these signals result in marginal profits, if not for losses
•> SMAs are usually constructed using the closing price, while it is also possible to calculate it from the open, the high and the low data points.
•> Moving averages provides support and resistance to prices, specifically in a trending market.
•> Whenever prices close above their 200 day SMA, the long term trend is up and vice-versa.

Disclaimer: The author is Head - Technical & Derivative Research at Narnolia Financial Advisors. The views and investment tips expressed by investment expert on are his own and not that of the website or its management. advises users to check with certified experts before taking any investment decisions.

The Great Diwali Discount!
Unlock 75% more savings this festive season. Get Moneycontrol Pro for a year for Rs 289 only.
Coupon code: DIWALI. Offer valid till 10th November, 2019 .
First Published on Sep 16, 2018 10:26 am
Follow us on
Available On