Moving average is a widely used technical indicator that helps smoothen out the volatility in a stock’s price action by filtering out the noise from random price fluctuations. A moving average is a trendfollow lagging indicator as it is calculated taking past data into consideration. As the name suggests, a moving average is an average that moves as old values are dropped with the availability of new values. Moving averages can be employed to identify the current trend of a scrip.
There are 3 types of moving averages
It is obtained by computing the simple average of price data over a defined period of time. In general, we use the closing price of the security to compute the SMA as it is considered to have more significance compared to the remaining price points (namely, open/high/low price for the day). Thus, a fiveday SMA is calculated by adding the closing price of five days and dividing this sum by the total number of days (in this case, five).
For e.g., the fiveday SMA of ITC can be calculated as follows:
ITC
Date  Close Price  5 Period SMA 

Jul 3, 2017  342.5   
Jul 4, 2017  337.25   
Jul 5, 2017  331.05   
Jul 6, 2017  337.10   
Jul 7, 2017  334.30  336.44 
Jul 10, 2017  333.30  334.60 
Jul 11, 2017  330.40  333.23 
Jul 12, 2017  328.85  332.89 
To calculate the moving average of the scrip after the close of market hours on July 7, 2017, we will consider the closing price of the last five trading sessions (from July 3 to July 7) and divide it by 5.
To recalculate the fiveday SMA at the close of the next trading session on July 10, 2017, exclude the closing price from July 3 and consider the one on July 10 i.e. the new data value.
As illustrated in the example, price gradually decreases from 342.5 to 328.85 over a period of eight days; in the same timeframe, the fiveday SMA also decreases from 336.44 to 332.89, indicating a lag associated with the moving averages. Hence, larger the time period, larger is the lag.
Weighted moving average moves a step ahead of simple moving average. Here, we assign a weight to each value, with bigger weights assigned to the most recent data points as they are more relevant than historical data points. The sum of weights should add up to 1 (or 100%). As new data points are added, the new weights will align accordingly. In contrast, each value is assigned the same weight in SMA. Ideally, traders calculate WMA on the basis of the closing price.
WMA is calculated by multiplying the given price by its assigned weight and then dividing the sum by the total number of days. The weights assigned are subjective in nature are at the discretion of the trader. Because of its calculation methodology, WMA follows prices more closely than a corresponding SMA. This reduces lag to an extent.
ITC
Date  Close Price  Weights  WMA 

Jul 3, 2017  342.5  0.13  
Jul 5, 2017  331.05  0.20  
Jul 5, 2017  331.05  0.20  
Jul 6, 2017  337.10  0.27  
Jul 7, 2017  334.30  0.33  335.34 
Jul 10, 2017  333.30  334.29  
Jul 11, 2017  330.40  332.89  
Jul 12, 2017  328.85  331.43 
Exponential moving average widely differs from the simple and weighted moving averages methodologies as it is calculated by considering all historical data points since the inception of the stock. Ideally, to calculate 100% accurate EMA, we should use all closing prices right from the first day a stock was listed.
Calculating the EMA involves a threestep process:
Step 1: Since it would not be practical to calculate historical data right from the inception of the stock, we use the SMA value as the initial EMA value. So, a simple moving average is used as the previous period's EMA in the first calculation.
Step 2: To calculate the weighting multiplier, we divide 2 by the sum of total periods and add it to 1.
Step 3: We subtract the EMA of the previous day from the current closing price and multiply this number with the multiplier. We then add this product with its previous period EMA to find out the final EMA value.
Therefore, the current EMA value will change depending on how much past data we use in our calculation. The more data points we use, the more accurate our EMA will be. The goal is to maximize accuracy while minimizing calculation time.
Initial EMA value = 5day SMA
Weighting Multiplier= (2 / (Time periods + 1)) = (2 / (5 + 1)) = 0.3333 (33.33%)
EMA= {Close – EMA of previous day} x multiplier + EMA of the previous day
A fiveday EMA applies a 33.33% weighting to the most recent prices, while a 10day EMA has a weighting multiplier of 18.18%. The shorter the time period, larger the weighting multiplier will be. We notice that as the time period doubles, the weighting multiplier drops 50%.
Date  Close Price  Fiveday SMA  Weighting factor  Fiveday EMA 

Jul 3, 2017  342.5       
Jul 4, 2017  337.25       
Jul 5, 2017  331.05       
Jul 6, 2017  337.10       
Jul 7, 2017  334.30  336.44    336.44 
Jul 10, 2017  333.30  334.60  0.3333  335.39 
Jul 11, 2017  330.40  333.23  0.3333  333.73 
Jul 12, 2017  328.85  332.79  0.3333  332.10 
5day EMA on July 7 = 5day SMA= 336.44
5day EMA on July 10 = 335.39 = (333.30336.44) x 0.33 + 336.44
5day EMA on July 11 = 333.73 = (330.40335.39) x 0.33 + 335.39
5day EMA on 12 = 332.10 = (328.85 333.72) x 0.33 + 333.72
Different values are generated when we compare the computation methodology of the three different moving averages. The most common moving average among traders is EMA.
Moving Averages  SMA  WMA  EMA 

Advantages 



Disadvantages 



Moving average value comparison: The following table represents the comparison between the values of the three different moving averages over the same period of time
Date  Close Price  Fiveday SMA  Fiveday WMA  Fiveday EMA 

Jul 3, 2017  342.5       
Jul 4, 2017  337.25       
Jul 5, 2017  331.05       
Jul 6, 2017  337.10       
Jul 7, 2017  334.30  336.44  335.34  336.44 
Jul 10, 2017  333.30  334.60  334.29  335.39 
Jul 11, 2017  330.40  333.23  332.89  333.73 
Jul 12, 2017  328.85  332.89  331.43  332.10 
As seen in the above graph, where blue, green, and pink are the fiveday EMA, WMA, and SMA, respectively, when there is a sharp correction in the price, EMA and WMA react the most as they assign a higher weight to the most recent prices compared to the SMA.
Traders use moving averages to identify the trend of a stock. A rising 200day moving average reflects that the longterm trend is up and the stock can be traded with a positive bias. Similarly, a falling 200day moving average reflects a longterm downtrend and hence, we can consider shorting the stock or refrain from investing in it.
(Blue: 10day EMA; green: 89day EMA; pink: 200day EMA)
From the above graph, we can clearly see that L&T Finance is in a longterm uptrend as the short and mediumterm averages are trading above its longterm 200day moving average, which is also showing an upward momentum. A price dip towards its mediumterm average can be considered as a buying opportunity.
A buy signal is generated when a bullish crossover occurs, i.e. the shortterm moving average crosses the longterm moving average, popularly referred to as a golden cross. For e.g., when the 89day EMA crosses above the 200day EMA, a bullish trade can be initiated.
On the other hand, a bearish death cross occurs when the shortterm moving average crosses below the longterm moving average. The generated signals tend to occur with a lag as we make use of two lagging indicators. The best trading opportunities are obtained in a trending market as compared to a sideways market, wherein whipsaws or false signals are generated.
Price  89day EMA  Action/View  Technical term 

Trading above 200EMA  Crosses above 200EMA  Bullish  Golden cross 
Trading below 200EMA  Crosses below 200EMA  Bearish  Death cross 
In the above graph, we see how moving averages can be used to generate trading signals. Moving averages can also be used to generate signals with simple price crossovers. A bullish signal is generated when prices move above the moving average and a bearish signal is generated when prices move below it. The advantage of price signals is that it reduces time lag and allows traders to react quicker.
As in the Fortis case represented above, traders could have initiated a short position or could have closed their long positions when the stock closed below its 200day EMA. Consequently, a huge surge in trading volumes, with the MACDHistogram moving into the negative territory, indicated a change in momentum. This hinted traders to take a bearish view, thus resulting in an 18% fall in the stock.
Moving averages also tend to act as support and resistance levels. A stock in a longterm uptrend could find support near its mediumterm EMA during a pullback. Similarly, a stock in a longterm downtrend could face resistance near its mediumterm EMA during any bounce backs.
In fact, some moving averages may offer support or resistance simply because they are widely used by many traders. For e.g., a trader may not short a stock if it is trading near its 200day EMA out of fear that other traders may be using it as a buy zone.
In the above example of JSW Steel, we see how the stock has taken support along its mediumterm 89day EMA on multiple occasions and has acted as a good support level to purchase the stock.
Moving averages can also be traded in tandem with candlestick patterns. In the above chart of Bata India, the bullish candlestick pattern can be traded with added confidence as it coincides with the support of the 200day EMA.
In the above chart of United Spirits, a buy signal is generated when the bullish crossover coincides with a cup and handle breakout on the daily chart, affirming a bullish bias in the stock.
Moving averages are used to construct technical indicators such as Bollinger Band and MACD, which are widely used by market technicians.
Moving averages are used based on the trading horizon.
For e.g.,
Moving Average  Trading Period 

5day MA  Shortterm 
13day MA  Shortterm 
50day MA  Mediumterm 
89day MA  Mediumterm 
200day MA  Longterm 
Bollinger Bands® are one of the most widely indicators used in technical analysis. They are volatility bands that are placed above and below a moving average and automatically expand or contract with a change in volatility. The dynamic nature of Bollinger Bands allows them to be used on different securities without having to change the setting. Famous technical trader John Bollinger developed this tool and registered it as his trademark.
There are three lines that compose Bollinger Bands: a simple moving average (middle band) and an upper and a lower band.
Middle band = 20day SMA of the closing price
Upper band = 20day SMA + (20day standard deviation of price * 2)
Lower band = 20day SMA  (20day standard deviation of price * 2)
The default setting of the middle band, i.e. the simple moving average is usually set at 20 days. A simple moving average is used because the standard deviation formula also uses a simple moving average. The upper and lower bands are usually set two standard deviations above and below the middle band, respectively.
Traders use Bollinger Bands to determine overbought and oversold levels. A trader will try to sell when the price, backed by a bearish signal on the price chart, reaches the top of the band, and will execute a buy when the price, backed by a bullish signal on the price chart, reaches the bottom of the band. According to Bollinger, the bands should contain 8889% of price action, which suggests that the price would move within the band for a majority of the time.
The interpretation is that the stock price should hover around the average price. However, if the current stock price is around its upper band, it is considered expensive in respect to the average. Here, one should look at shorting opportunities if there is a confirming signal on the price chart with an expectation that the price will scale back to its average.
Likewise, if the current market price is around the lower band, it is considered cheap in respect to the average prices. Here, one can look at buying opportunities with an expectation that the price will scale back to its average.
In the above example of Pidilite Industries, we observe instances where a trader can initiate trades based on oversold and overbought levels on the Bollinger Band conceding with bullish and bearish candlestick patterns on the price chart.
An important point to keep in mind is that the upper and lower Bollinger Bands together form an envelope, which expands whenever the price drifts in a particular direction, indicating a strong momentum. The Bollinger Band signal fails when there is an envelope expansion. This leads us to an important conclusion, Bollinger Bands work well in a sideways markets, and fail in a trending market.
Standard deviation is a statistical measure to gauge the amount of variability or dispersion around an average. It measures the difference between the actual value and the average value. If a security trades in a narrow price range, the standard deviation will give a lesser value, which indicates low volatility. Conversely, if the security witnesses wild price swings, either up or down, then standard deviation gives a higher value, which indicates high volatility.
Standard deviation is mainly used as a confirmatory indicator. It tends to surge as price gets volatile. As the price action declines, the standard deviation moves lower. A price move backed by a surge in standard deviation indicates aboveaverage strength and weakness.
Market bottoms that are accompanied by decreased volatility over longer periods of time indicate a lack of interest in the security among traders, while market bottoms accompanied by a surge in volatility over a short duration indicate panic selloffs.
Standard deviation values depend on the price of the security in question. Securities with a higher price tend to have a higher standard deviation value compared to stocks with low price. Hence, a stock like Eicher Motors or Page Industries (current market price at ~Rs30,000) will always have a higher value compared to a stock like Ashok Leyland (CMP ~Rs144). However, the absolute value is not of much importance; what traders look for is the trend in the standard deviation with respect to the price action.
Standard deviation values are also affected if a security experiences a large price change over a short period of time. A stock that has surged from 15 to 60 is most likely to have a higher standard deviation at 60 than at 15. Likewise, a security that moves from 10 to 50 will most likely have a higher standard deviation at 50 than at 10.
Aban Offshore’s chart above depicts a decline in price and a gradual decline in volatility, indicating a lack of buying interest in the stock.
Alkem’s chart above, depicts a panic selloff; the decline in price is accompanied by a surge in the standard deviation, indicating that traders are expecting the correction in the stock to accentuate and, hence, want to exit at any cost.
On the contrary, the above chart of Bata India shows a surge in prices backed by a surge in standard deviation, thus indicating strength in the stock. This is usually witnessed when there is a huge buying interest in the stock.
The MACDHistogram (Moving Average Convergence DivergenceHistogram) is an oscillator that fluctuates above and below the zero line. The MACDHistogram is used to anticipate signal line crossovers in MACD, which turns moving averages into momentum indicators by subtracting a longer moving average from a shorter one. Since MACDHistogram makes use of moving averages and as moving averages inherently lag behind price, there can be a delay in signal line crossovers, which could affect the rewardtorisk ratio of a trade. Bullish or bearish divergences in the MACDHistogram can alert chartists to an imminent signal line crossover in the MACD.
MACD = (12day EMA  26day EMA)
Signal Line = 9dayEMA of MACD
Thus, MACDHistogram = MACD  Signal Line
The default MACD indicator is the 12dayEMA minus the 26dayEMA, while a 9dayEMA is plotted alongside the chart to act as the signal line to identify turns in the indicator. The histogram is positive when MACD is above its 9dayEMA and negative when it is below it.
The MACDHistogram is designed to identify convergence, divergence and crossovers. It displays the extent of separation between the MACD and its signal line. The histogram is positive when MACD is above its signal line. Positive values increase as MACD diverges further from its signal line and decrease as it converges with its signal line. The MACDHistogram crosses the zero line as MACD crosses below its signal line. The indicator is negative when MACD is below its signal line. Negative values increase as MACD diverges further from its signal line. Conversely, negative values decrease as MACD converges on its signal line.
With this method, a buy signal occurs when the MACD line crosses above the signal line forming a confirmatory bullish candlestick pattern on the price chart. A sell (short) signal occurs when the MACD line crosses below the signal line along with a bearish candlestick on the price chart.
In the above example of Shiram Transport Finance, we witnessed a sell signal on January 18, 2018, when the MACDHistogram crossed below the center line with a confirmatory bearish signal on the price chart. On the other hand, a bullish signal was generated on February 23, 2018, when the MACDHistogram witnessed a positive crossover over the center line.
There are no builtin targets with this indicator, so trades are generally held until a crossover in the opposite direction occurs. New trades can then be initiated in the direction of the new crossover.
The downfall of this strategy is that it can result in whipsaw trades, when the MACD and signal lines cross back and forth in a short amount time; hence, the indicator, just like moving averages, should be made use of in trending markets. Another way to avoid whipsaws is to only take trades in the direction of a longterm trend. If the trend is up, only take buy signals, and exit when the MACD line crosses back below the signal line.
The MACDHistogram anticipates signal line crossovers in MACD by forming bullish and bearish divergences. Bearish divergence is when the price is making new highs, but the MACD is not. It shows that momentum has slowed, and that a reversal could be witnessed soon.
Bullish divergence is when the price is making new lows, but the MACD is not. It shows that selling pressure has slowed, and that a reversal could be around the corner.
It is risky to base trades solely on divergence, wait for the confirmation signal on the price chart. A stock can continue to rise (fall) for a long time even while bearish (bullish) divergence is occurring.
In the above example of Bosch, notice that the price tries to make a new low late in March 2018, but the MACD is already making higher highs. This indicates that a reversal is around the corner, and it is exactly what is witnessed in the following days, with the stock witnessing a breakout on the price chart and a bullish signal line crossover on the MACDHistogram.
The force index is a technical indicator that combines the price and volume to determine the strength behind a move or help identify possible turning points. Put simply, it helps gauge the strength behind price movements by looking at a combination of three key pieces of market data, i.e.
Force index = {Close (current period)  Close (prior period)} * Volume
Calculation of the oneday force index is straightforward. We simply subtract the prior close from the current close and multiply the difference by current period’s volume. The force index for more than one day is computed by taking the EMA of the oneday force index. For example, a 20day force index is the EMA of a oneday force index value for the last 20 days.
Force index is positive when the current close is above the prior close, and negative when the current close is below the prior close. For the force index to produce a large value, the price change and volume have to be significant.
In order to smoothen the oneday force index and produce less whipsaws, a trader can consider using the indicator with a 10day or 14dayEMA to reduce the positivenegative crossovers.
Force index produces either a positive or negative value based on the price movement. A positive price change signals that buyers were stronger than sellers, while a negative price change signals the opposite. Meanwhile, the extent of the price move along with the volume shows the commitment of the trader, i.e. a big advance on heavy volume show the bullishness of the buyer, and likewise, a big decline on heavy volume displays the bearishness of the seller.
The force index can also be used to determine the medium or longterm trend of a stock as well as reinforce the trend. The trend in question, short, medium, or longterm, depends on the parameters of the force index. While the default force index parameter is 13, chartists can use a higher number to further smoothen the chart or a lower number for less smoothening.
In the above example of Avenue Supermarts, the stock witnessed a breakout on the price chart on April 5, 2018. At the same time, the 10dayEMA force index traded in a higher tophigher bottom chart structure and gave an additional confirmation signal to the trader to place a bullish trade. Likewise, the stock witnessed a continuation in the uptrend and rallied from 1,400 to 1,490 levels in the next three trading sessions.
Bullish and bearish divergences can alert traders about a potential change in trend. Divergences are classic signals associated with oscillators. A bullish divergence forms when the indicator moves higher as the security moves lower. Contrariwise, a bearish divergence forms when the indicator moves lower as the security moves higher. Here, even though the security is moving higher, the indicator shows underlying weakness by moving lower.
Confirmation is an important part of bullish and bearish divergences. A bullish divergence can be confirmed with the force index moving into positive territory and with a resistance breakout on the price chart. A bearish divergence can be confirmed with the force index moving into the negative territory and a support break on the price chart. Chartists can also use candlesticks, moving average crosses, pattern breaks, and other forms of technical analysis for confirmation.
In the above chart, a bullish divergence can be witnessed as Nifty forms a lower toplower bottom structure while the force index manages to form a higher bottom structure. Nifty finally witnesses a breakout and gives a close above the declining trend line, thus, confirming the bullish divergence.