Exponential Moving Average (EMA): Complete Beginner’s Guide with Trading Strategy

Exponential moving average (EMA)

The moving average is one of the oldest and most basic indicators that is used in identifying price action. Earlier the common moving average was used. It was named simple moving average or SMA. Represented by a line, it connects the average data points of historical prices. The slope of the line shows us the price change patterns visually.

But later, it was found that with the help of SMA, we didn’t get an accurate price projection. To give more weightage to recent data points, the EMA evolved.

EMA gives us an idea of the present trend. Different uses of EMA are discussed in this article. We will get to know when and how EMA lines can be used to find trading ideas.

The exponential moving average gives us an idea of support and resistance. When the EMA is used with other indicators, the signals become more accurate and powerful.

What is the Exponential Moving Average (EMA)?

The exponential moving average or EMA is the moving average of over a specific time period which is calculated by giving more weight to the most recent price data, making the price average react faster to price changes.

Usually, the exponential moving average (EMA) is calculated by taking in the closing prices as with most other types of moving averages. The result of this calculation is represented by a curved line known as the exponential moving average (EMA) line.

There’s a minimum lag factor involved in it due to the application of more weight on a most recent price data point.

Lag Factor in EMA

All kinds of moving averages are calculated using the historical price data points. Therefore, there is a tendency of lagging found with the moving average lines.

The introduction of EMA solved this problem a little. By giving more weight to recent data points, the amount of lagging is found to be less in the case of EMA. But the lag is still there.

What is the Exponential Moving Average (EMA)?

Due to the lag, the shorter period EMA line responds faster than that with a longer period. For example, a 10-day EMA line moves almost along with the price action and reacts faster than a 100-day EMA.

Shown above is the chart of Nifty 50 with an overlay of 1an 0-day EMA and 100-day EMA lines. We can see the 10-period EMA is clinging close to the price candles and responding faster to price changes.

But the 100-period EMA line is sluggish, moving very little with all the price changes shown above. The chart shows the 10-period EMA line in red and the 100-period EMA line in black.

The 100-period EMA line is so slow to react that all the price changes shown above affected the 100-period EMA line very little and the price changes are only reflected on the line by changing the slope.

We can conclude that the response is faster for EMA with shorter time periods. The longer EMA is affected by large price changes.

How is Exponential Moving Average Calculated?

Primarily, the exponential moving average was calculated by applying a percentage of the current day’s closing price to the moving average of the previous day. It was done because EMA gives more weight to current market prices.

For example, to calculate a 9% exponential moving average of stock, we should multiply today’s closing price by 9%. Then, add this to the moving average of yesterday by 91% (100-9).

Today’s closing price*9/100 + Yesterday’s moving average*91/100 = Today’s price*o.09 + Yesterday’s moving average*0.91

But traders always prefer working with time periods instead of percentages. The percentage can be converted to time periods EMA, and a 9% EMA can be converted to 21.2-day EMA or 21-day EMA.

The formula for converting exponential percentage to time period is Time periods = [2/percentage]-1

With this formula, it can be proven that the 9 percent moving average is equivalent to 21-day EMA. 21.2 days = [2/0,09]-1

The formula for converting time periods to exponential moving average is Exponential percentage = 2/ [Time periods] + 1

Using this formula, it can be easily determined that the 21-day EMA is actually a 9% EMA. 0.09 = 2/ [21+1] i.e. 2/22 = 0.09

The above calculation is done for the calculation of EMA for the first time when no earlier EMA data is available.

Formula for EMA

Shown below is the formula for EMA. Here, the formula has used the weighting factor denoted by K. We also call K the smoothing constant. K is equal to 2/(n+1), where n is the selected time period. Why do we need the weighting factor? By definition, EMA gives more weight to recent prices. That’s why we need a weighting factor.

In EMA calculations we use K* (current price – Previous EMA) + Previous EMA when we need the previous period’s EMA. But what if there is no data on the previous EMA. It usually happens when we need the price chart for a newly listed company. The lack of price data from previous days makes it impossible to calculate the EMA.

In those cases, for calculations of EMA for the first time, we use the simple moving average (SMA) of previous n periods.

But for other cases, previous EMA means the EMA of the previous trading day.

From this formula, it is evident that the most recent prices are given more weightage than older ones. Hence, the shorter period EMA line clings more to the price than the older ones.

Formula for EMA

The weighting multiplier in EMA

Let us see the difference in weightage given to two different period EMAs.periods 21-period EMA, according to formula, K = 2/ (21+1) = 0.09 = 9%

For 100-period EMA, K = 2/ (100+1) = 0.019 = 1.9%

Hence, in shorter time frames, more weightage is given. A 21-period EMA gets 9% weight whereas a 100-period EMA gets 1.9% weight. For these reasons, shorter period EMA lines are more responsive to price changes than longer period EMAs.

The weighting multiplier in EMA

What are the EMA values traders should use?

Traders use EMA for different trading purposes. For this reason, they use EMAs of different periodicities. A 5 to 21-period EMA-perioded for short-term references. For longer-term EMAs, the use of 50, 100, and 200 periods EMAs are more common and favored by traders.

Typically, 12 and 26-period EMAs are used for the short term. We can see period customization options in charts showing EMA. It is because there is no ideal fit time period for all stocks.

What is the difference between EMA and SMA?

What is the difference between EMA and SMA?

Simple moving average formula

The simple moving average (SMA) gives equal weight to all price points. See how the average varies as seen in the picture. The first 5-day SMA is 13, the second 5-day SMA is 14 and the third 5-DAy is SMA 15. We see that the average varies by a large amount and gives different outputs. Such output variation doesn’t help and creates different price projections.

Simple moving average formula

Exponential moving average formula

The result of exponential the moving average is slightly different. For a 10-period EMA, 18% weight is given to the most recent price points making the EMA very close to the nearest price averages.

Exponential moving average formula

Let’s look at the chart below. The EMA line is shown by the green line and the SMA is shown by the red line. The EMA line is more sensitive to price changes and responds faster.

But the EMA needs more historical data to calculate the EMA. If the earlier data is not available, the output line may not be very accurate.

EMA vs SMA chart

There exist some similarities also. Both EMA and SMA are very similar in application. Both are used for trend identification. Both are used to smooth price fluctuations.

Accuracy of Exponential Moving Average (EMA)

 We have already found that the EMA is more accurate than SMA. Here we are going to find how accurate these two are through an example of spreadsheet data.

Shown below a 30-day data on EMA and SMA with prices. From the 10th day onwards, we have found the 10-day SMA and EMA which are written below. Besides price and date, we have three more columns. The 10-day SMA, the smoothing constant K and the 10-day EMA.                 The first EMA on the 10th day is 22.22, equal to SMA. On the 11th day also they both were 22.22 but from the 12th day onwards, the reading started to vary.

On the 30th day, we find the SMA has become 23.13 but the EMA is 22.92. So, we find the EMA is far more accurate than SMA.            

Accuracy of Exponential Moving Average (EMA)

Example of EMA line

The EMA can be calculated on any periodicity, any time frame. Many traders follow the daily EMA for trading purposes. Intraday traders also follow the EMA line on 15-minute charts.

Shown below is a 20-period exponential moving average line (the blue line). We see how the EMA line responds to price actions. EMA line follows the price everywhere but leaves out small bounces from the line.

The small price fluctuations are called Whipsaws. To prevent the whipsaws from misleading the traders, the smoothing constant has been applied to the EMA formula. This is also otherwise known as the weighting factor.

But, despite the presence of a smoothing constant, the exponential moving average EMA line must follow the price curve as accurately and as closely as possible.

Example of EMA line

How to trade with Exponential Moving Average (EMA)?

The EMA line can be used in trading. We will see how it is done in the charts.

Trend identification

We can get trend information from moving average lines, be it EMA or SMA. A rising EMA line shows a positive trend and a falling EMA line shows a negative price trend. We also see during the downtrend price comes below the EMA line. And during an uptrend, the price goes over the EMA line. Thus, trend identification becomes easier with these crossovers.

Trend identification using EMA

Double crossover

Two EMAs of different periodicities are used to find trading signals. In the chart below we see two EMAs are used to generate trading signals from EMA crossovers. When the shorter period EMA (10-period EMA) crosses the longer period (50-period EMA), a buy signal is generated. Similarly, a sell signal is generated when the 10-period EMA comes below the 50-period EMA.

Double crossover using ema

Price crossover

Similar to double crossover, a price crossover can also be used to generate trading signals. When the price comes up from below and crosses the EMA line, a buy signal is generated. MACD can be used to confirm the trade. In the chart below we see how it is done. For a sell signal, the price has to come below the EMA line.

Price crossover using ema

Ribbons

One trading strategy uses several time periods. All these EMA lines together look like a ribbon. They are called moving average ribbons or EMA ribbons. If the ribbons run parallel to price, that indicates a strong trend.

If the EMA lines are contracting, it indicates the start of a new trend. If the EMA lines are moving apart from each other, that indicates the trend is coming to an end.

ema ribbons

Bullish crossover

Bullish crossovers occur when a moving average crossover creates a bullish trading signal.

Bearish crossover

A bearish crossover occurs when the crossover signals a downtrend. It creates a bearish trading signal.

Support and Resistance levels using EMA

EMA lines, especially longer-term EMA lines act as support and resistance lines. Given below is an example of how an EMA line acts as a price support line. Whenever the price tries to go below the EMA line or even touches the line, the price bounces back automatically. In such cases, the EMA line acts as a price support line beyond which the price cannot go even below the EMA line.

Support levels using EMA

Similarly, the EMA line also acts as a resistance line in a downtrend. Price comes down whenever there is an attempt to breach the line.

Resistance levels using EMA

Kauffman’s Adaptive Moving Average (KAMA)

EMA has been effectively used to create another indicator known as Kauffman’s Adaptive Moving Average or KAMA.

Guppy Multiple Moving Average (GMMA)

Multiple EMAs have been used to create this indicator. Six short-term and six long term indicators have been used in GMMA. It looks like ribbons. The GMMA is used to identify the potential breakout of a stock.

DEMA

It is a double exponential moving average. Two EMAs are used together to identify trading signals. We use it to identify bullish and bearish crossovers.

TEMA

It is a Triple exponential moving average. Three EMAs are used together to identify trading signals. Similar to DEMA, we use it to identify bullish and bearish crossovers.

Advantages of Exponential Moving Average (EMA)

Trend identification

As discussed earlier, the exponential moving average (EMA) can help us to identify trends. An upward slope of the EMA line indicates a bullish trend and a downward slope of the EMA line indicates a bearish trend. Coupled with price crossovers of EMA lines we can identify trends effectively.

Base Data

We use the closing price to calculate EMA. In addition to that EMAs are effectively used on open, high or low data points of price. Also, EMA is applied to different types of base data and indicators. The common use is using the EMA line on volume as an overlay or using on RSI and other indicators.

Shown below is a live chart and application of EMA on RSI and volume. A 20-period EMA is used on RSI and volume. We commonly use the EMA line on these to get the trend of volume and RSI.

Advantages of Exponential Moving Average (EMA)

Limitations of using Exponential Moving Average (EMA)

The EMA has some inherent disadvantages.

  • EMA is a lagging indicator. It depends on the previous price movement. Therefore, it is hard to project future price projections by using EMA.
  • Trading signals like crossover strategies are not very efficient and have a low success rate.
  • Vulnerable to false signals and creates whipsaws.

Here are some alternatives to EMA: Important technical indicators

Bottomline

Moving averages are trend-following indicators. Hence, they are effective, especially EMAs in a trending market and ensure that the trader follows the trend. Traders know that trend is always a trader’s friend. Therefore, traders prefer to use them in a trending market.

But during a trading market, when the price oscillates within a limit, EMAs are prone to create whipsaws. Hence, it is best to avoid EMAs for trading in trading markets.

It is best to use EMA with other indicators to create efficient trading strategies.

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like