The Study Of Stock Market Through Technical Analysis

Lesson -> Indicators - A Broad Understanding

15.1 MACD - Concept
(Moving Average Convergence & divergence)

Gerald Appel created the Moving Average Convergence and Divergence indicator (MACD) in the late seventies. MACD is considered the most important indicator by traders. MACD was created in the seventies and is still considered to be one of the most reliable indicators for momentum traders.

MACD, as the name implies, is about the convergence or divergence between the two moving averages. When the two moving averages are moving towards one another, it is called convergence. Divergence happens when they move away.

The standard MACD calculation is based on a 12-day EMA and a 26-day EMA. Both EMA's are based upon the closing prices. To calculate the convergence and divergence value (CD), we subtract the 26 EMA from 12 day EMA. This simple line graph is commonly referred to by the "MACD Line". Let's first go over the math and then we will look at the MACD applications.

DateCloseEMA(Day 12)EMA(Day 26)Lineof MACD
1-Jan-146302   
2-Jan-146221   
3-Jan-146211   
6-Jan-146191   
7-Jan-146162   
8-Jan-146175   
9-Jan-146168   
10-Jan-146171   
13-Jan-146273   
14-Jan-146242   
15-Jan-146321   
16-Jan-146319   
17-Jan-1462626230  
20-Jan-1463046226  
21-Jan-1463146233  
22-Jan-1463396242  
23-Jan-1463466254  
24-Jan-1462676269  
27-Jan-1461366277  
28-Jan-1461266274  
29-Jan-1461206271  
30-Jan-1460746258  
31-Jan-1460906244  
3-Feb-1460026225  
4-Feb-1460016198  
5-Feb-1460226176  
6-Feb-14603661536198-45
7-Feb-14606361306188-58
10-Feb-14605361076182-75
11-Feb-14606360836176-94
12-Feb-14608460666171-106
13-Feb-14600160616168-107


 

Let's start at the left.

  1. The dates are listed below, beginning at 1 Jan 2014.
  2. We also have the closing price for Nifty, in addition to the dates.
  3. To calculate the 12-day EMA, we leave the first 12 data points (closing Price of Nifty).
  4. The 26 first data points are then used to calculate the 26-day EMA.
  5. When we have both the 12 and 26-day EMA running simultaneously (6 Feb 2014), we can calculate the MACD value
  6. MACD value = [12-day EMA - 26-day EMA]. On 6 th February 2014, the 12 day EMA value was 6153 and 26 day EMA 6198, respectively. The MACD would then be 6153-6198 = 45

We can calculate the MACD value for 12 and 26-day EMAs, and plot it as a linegraph to get the MACD line. This line oscillates above the central line.

DateCloseEMA(DAY 12)EMA(DAY26)Line of MACD
1-Jan-146302   
2-Jan-146221   
3-Jan-146211   
6-Jan-146191   
7-Jan-146162   
8-Jan-146175   
9-Jan-146168   
10-Jan-146171   
13-Jan-146273   
14-Jan-146242   
15-Jan-146321   
16-Jan-146319   
17-Jan-1462626230  
20-Jan-1463046226  
21-Jan-1463146233  
22-Jan-1463396242  
23-Jan-1463466254  
24-Jan-1462676269  
27-Jan-1461366277  
28-Jan-1461266274  
29-Jan-1461206271  
30-Jan-1460746258  
31-Jan-1460906244  
3-Feb-1460026225  
4-Feb-1460016198  
5-Feb-1460226176  
6-Feb-14603661536198-45
7-Feb-14606361306188-58
10-Feb-14605361076182-75
11-Feb-14606360836176-94
12-Feb-14608460666171-106
13-Feb-14600160616168-107
14-Feb-14604860516161-111
17-Feb-14607360456157-112
18-Feb-14612760456153-108
19-Feb-14615360486147-100
20-Feb-14609160606144-84
21-Feb-14615560686135-67
24-Feb-14618660796129-50
25-Feb-14620060926126-34
26-Feb-14623961036122-19
28-Feb-14627761186119-1
3-Mar-1462216136611720
4-Mar-1462986148611236
5-Mar-1463296172611359
6-Mar-1464016196612175
7-Mar-1465276223613192
10-Mar-14653762566147110
11-Mar-14651262886165124
12-Mar-14651763246181143
13-Mar-14649363546201153
14-Mar-14650463806220160


 

Let's look at the MACD value and try to answer some obvious questions.

  1. What does a negative MACD number mean?
  2. What does a positive MACD number mean?
  3. What does the MACD value really mean? What information does a MACD value of -90 provide versus a MACD value of -30?

The MACD sign indicates the direction in which the stock is moving. The MACD value is +160 if the 12 Day EMA stands at 6380 and the 26 Day EMA at 6220. What circumstances would you expect the 12 Day EMA to be higher than the 26 Day EMA? This was something we looked at in the moving average chapter. If the stock price trend upwards, the shorter-term average will be generally higher than the longer term average. The shorter-term average will be more responsive to current market prices than the longer-term average. Positive signals indicate that the stock has positive momentum and is on the rise. The magnitude of the momentum is higher when it is higher. A positive trend that is stronger than +120, for example, would be +160.

The magnitude is affected by the stock's price. The MACD will therefore be larger if the price of the stock is higher than Bank Nifty.

If the MACD is negative it means that the 12 day EMA falls below the 26-day EMA. The momentum is therefore negative. The stronger the trend downwards, the greater the MACD.

The MACD spread is the difference between these moving averages. Spread decreases as momentum slows down, and increases as momentum increases. The MACD line is often used to show convergence and divergence.

As you can see, MACD oscillates above a central zero line. This is also known as the 'Centerline. The MACD indicator's basic interpretation is:

  1. If the MACD Line crosses over the centerline between negative territory and positive territory, this indicates that there is divergence between these averages. This indicates increasing bullish momentum and should be considered a signal to buy opportunities. This chart shows that this trend is around 27 th February
  2. If the MACD line crosses over the centerline between positive territory and negative territory it indicates that there is convergence between the two averages. This indicates a growing bearish momentum and should be considered as a signal to sell opportunities. You can see that the MACD nearly turned negative in two instances (8th May and 24th July), but it stopped at the zero line and reversed direction.

Traders argue that, while they wait for the MACD line cross the centerline it is possible to already have a large portion of the movie completed and then trades can be entered. This is why there is an improvisation that can be made over the basic MACD line. An additional MACD component, the 9-day signals line, is used to improvise. The 9-day signal line (also known as an exponential moving average, EMA) is an extension of the MACD line. This gives us two lines.

  1. A MACD line
  2. A 9-day EMA of the MACD Line also known as the signal line.

Traders can use a simple 2-line crossover strategy, as described in the Moving Averages chapter. They don't have to wait for the centerline crossing over.

  1. Bullish sentiment occurs when the MACD lines crosses the 9-day EMA. The MACD line is higher than the 9-day EMA. This is when the trader should consider buying opportunities.
  2. When the MACD line crosses below 9-day EMA, the sentiment is bearish. This is a sign that the trader should consider selling opportunities.

Below is the chart that shows the MACD indicator for Asian Paints Limited. Below the price chart, you can see the MACD indicator.

 

This indicator uses standard parameters from MACD:

  1. Closed prices for 12 days EMA
  2. Closed prices for 26 days EMA
  3. MACD line (12D-26D EMA) represented with the black line
  4. 9-day EMA of MACD Line represented by the redline

A signal has to buy or sell is originated at the point where the chart's crossover is highlighted by the vertical lines of chart.

The first vertical line from left, for example, points to a crossover at which the MACD line is below the signal line (9-day EMA), and suggests a short trade.

The left 2 and vertical lines point to a crossover, where the MACD line is above the signal line. This should be considered a buying opportunity. And so on.

Moving averages are at the heart of the MACD system. The MACD indicator is similar to a moving average system in that it has similar properties. They are most useful when there is a strong trend, but not so much when the trend is moving in the opposite direction. This is evident between the first and second lines that start from left.

The MACD parameters aren't set in stone, it is obvious. You can change the 12 day, 26-day EMA timeframe to suit your needs. Personally, I prefer to use the MACD as it was originally created by Gerald Appel.

15.2 - A brief to 'Bollinger Bands'

John Bollinger introduced Bollinger Bands in the 1980s. It is one of the most important technical analysis indicators. The BB can be used to identify overbought or oversold levels. A trader will attempt to sell when the price is at the top of the bands and then will buy when it reaches its bottom.

There are 3 components to the BB:

  1. The closing prices are the 20-day simple moving average.
  2. An upper band is the +2 standard deviation from the middle line
  3. A lower band is the -2 standard deviation from the middle line

The standard deviation (SD), a statistical concept, measures the variance of a variable from its average. The stock price's standard deviation is used to measure the volatility of a stock. If the standard deviation of a stock price is 12%, then it means that the stock's volatility has 12%.

The standard deviation in BB is calculated on the 20-day SMA. The +2 SD is indicated by the upper band. We multiply the SD by 2 to get the average.

If the 20-day SMA is 7800 and the SD 75 (or 0.96%), then 7800 + 75*2 = 7950. A -2 SD is the same. It means that we multiply the SD with 2 and subtract it the average. 7800 + (2*75) = 7650

Now we have all the components for the BB:

  1. 20-day SMA = 7800
  2. Upper band = 7950
  3. Lower band = 7650

According to statistics, the current market price should be around 7800. If the current market price of 7950 is the average, it would be considered high. Therefore, it is a good idea to look into shorting opportunities in the expectation that the average price will drop.

The trade would therefore be to sell at 7950 with a target price of 7800.

It is also considered affordable compared to the average price if it has a current market price of around 7650. Therefore, it is worth looking into buying opportunities in order to anticipate that prices will drop to their average.

The trade would therefore be to buy at 7650 with a target price of 7800.

The trigger for initiating a trade is the upper and lower bands.

Below is the chart for BPCL Limited.

 

The 20-day SMA is the central black line. The +2 SD, and -2SD are the red lines above and below the black line. You can shorten the stock when it reaches the upper band and expect it to return to the average. You can also go long if the stock price touches the lower range, and expect it to return to the average.

I highlighted all the sell signals BB generated using a down arrow. While most of these signals worked well, there was a period when the price stayed within the upper band. The price drifted higher and the upper band expanded. This is known as an envelope expansion.

An envelope is formed by the BB's upper band and lower bands together. If the price moves in a certain direction, the envelope expands. This indicates strong momentum. When the envelope expands, the BB signal is not received. We can draw a crucial conclusion: BB is good in sideways markets but fails in a trending one.

I expect the trades to work almost immediately when I use BB. If it doesn't, I begin validating the possibility for an envelope expansion.

15.3 -Considering other Indicators

There are many other technical indicators that can be used to help traders, and there is no end to the possibilities. It begs the question, do you need to know all of these indicators in order to trade successfully? The simple answer is no. While technical indicators can be useful, they should not be your primary tool for analysis.

Many traders are aspiring to trade, and they spend too much time learning new indicators. This is often futile. A basic understanding of the indicators discussed in this module will suffice.

15.4 -A Checklist to Guide

We have built a checklist to guide trader's decisions about whether they want to buy or not. This checklist needs to be reexamined.

The indicators serve as a confirmation tool for traders. Before placing buy or sell orders, it is worth checking what the indicators are saying. Although the dependance on indicators is less than S&R, volumes, or candlestick patterns it is still important to be aware of what the indicators mean. I recommend that you add indicators to the checklist with a twist. Let me explain the twist later, but let's first reproduce the updated checklist.

  1. A recognizable pattern should be formed by the stock.
  2. S&R should confirm the trade. Stoploss should be at least S&R
    1. The support should be at the bottom of a long trade.
    2. The resistance should be the support for a short trade.
  3. Volumes should be confirmed
    1. Buy and sell volumes should be above the average
    2. Low volumes aren't encouraging so don't hesitate to trade when volumes are low
  4. It is important to confirm the accuracy of indicators
    1. If the confirm is required, increase the scale.
    2. If they refuse to confirm, continue with the original plan

These are the sub-bullet points below indicators.

Imagine that you have an opportunity to purchase shares of Karnataka Bank Limited. Karnataka Bank has created a bullish hammer on a specific day. Let's assume that everything checks off the checklist.

  1. The bullish hammer candlestick pattern is easily recognized
  2. Support also coincides with a low bullish hammer.
  3. The volumes are higher than average
  4. A MACD crossover is also possible (signal lines turn greater than the MACD lines).

All four points have been checked off and I'd be happy to purchase Karnataka Bank. So I place an order for 500 shares.

Imagine a situation in which the first three checklist conditions are satisfied, but the fourth condition (which indicators should confirm) is not. What should I do?

I would still buy but I would probably buy 300 shares instead of 500 shares.

I hope this will convey to you my views on the use of indicators.

If Indicators confirm my bet, I increase it. However, if Indicators do not confirm my purchase decision, I reduce my bet size.

I wouldn't do this with the three first checklist points. If the low of bullish hammer doesn't coincide with the support, I will rethink my plans to buy the stock. In fact, I might look elsewhere for an opportunity.

However, I don't treat indicators with the same conviction. Although it is helpful to have an idea of what the indicators are telling me, I don't base any of my decisions on that information. If the indicators are positive, I increase my bet size. If they aren't, I continue with my original game plan.

Keypoints

  1. MACD can be taken as a trend-following system
  2. MACD consists a 26-day EMA and a 12 day EMA.
  3. 12d EMA - 26d EMA is the Line of MACD
  4. The 9-day SMA of MACD line is the signal line
  5. You can apply a crossover strategy between the MACD Line or the signal line
  6. The Bollinger band captures volatility. It has a 20 day average, a +2 SD and a -2 SD
  7. If the price is currently at +2SD, one can shorten with the expectation that it will return to the average
  8. If the price is currently at -2SD, one can take a position with the expectation that it will return to the average.
  9. BB is a good choice in a sideways market. In a market that is trending, the BB's envelope expands. This can lead to false signals.
  10. While indicators are useful, they should not be used as the sole source of information for decision-making.