How to Trade with the EMA Indicator

11 Min read

The moving average indicator is one of the most popular and versatile technical indicators available to online traders. But it comes in several different forms, one of which is the Exponential Moving Average, often referred to simply as the EMA Indicator.

In this article we will explain what the exponential moving average indicator is, share the exponential moving average formula, demonstrate how to use the EMA indicator and much more!

What Is the Exponential Moving Average?

The moving average indicator is an essential tool for identifying trends. We use moving averages to smooth out variations in data, in order to better discern the underlying trend.

The indicator does this by looking back at a number of historical data points and then calculating an average of the values. But there is more than one way to calculate the average and, consequently, there are several different types of moving average indicators.

The most straightforward is the Simple Moving Average (SMA), which considers all price values equally and takes a mean average. However, other types of moving averages assign a different weighting to each price value, favouring recent prices more heavily than older prices.

This is the way in which the exponential moving average indicator is calculated. The most recent prices are assigned greater weighting, and this decreases exponentially as we move further back in time.

It is difficult to provide a fully satisfactory EMA indicator meaning without getting into the specifics of how to calculate the exponential moving average formula.

A basic exponential moving average definition is: a smoothing technique arrived at by adding a portion of the current price, to a portion of the value of the previous moving average. To properly understand what is going on, we need to take a look at the maths behind the exponential moving average calculation.

How to Calculate the Exponential Moving Average

We calculate an EMA value at time ‘t’ using the exponential moving average formula.

Exponential Moving Average
EMAt = α x current price + (1- α) x EMAt-1

Where 'α' is a smoothing constant with a value between 0 and 1 and EMAt-1 is the EMA value for the previous period.

The smoothing constant is defined by the number of periods (n) in the EMA and is calculated as such:

α = 2 / (n + 1)

You can see from the initial formula that calculating the EMA for a given point in time requires us to know the EMAs for previous periods. For a daily EMA, we derive the current value from the prior day's EMA, which in turn we derive from the day before that, and so on.

In other words, there are some other steps involved. The first of these is to obtain a starting point for our exponential moving average calculation, secondly, we need to determine our smoothing constant. The best way to illustrate the process of how to calculate the exponential moving average is to do so with an example.

The Exponential Moving Average Calculation

As mentioned earlier, in the calculation of the exponential moving average, we need a ‘Day 1’ value to start with. For this first value, we use a simple moving average, by finding the mean average of the previous ‘n’ values.

Therefore, our starting point in the calculation of the exponential moving average is actually a simple moving average.

Now we know where to start, let’s look at how to calculate an 8-day EMA from some sample values. Our smoothing constant will be:

  • 2 / (n + 1); or
  • 2 / 9

The table below shows the values involved in calculating the 8-day exponential moving average. The table also includes a column showing the SMA values for the sake of comparison.

Day Sample Price 8-Day SMA α 8-Day EMA
1 168      
2 170      
3 171      
4 175      
5 170      
6 172      
7 176      
8 179      
9 178 172.625 0.222222 172.625
10 186 173.875 0.222222 175.5972
11 192 175.875 0.222222 179.2423
12 183 178.5 0.222222 180.0773
13 177 179.5 0.222222 179.3935
14 172 180.375 0.222222 177.7505
15 167 180.375 0.222222 175.3615
16 177 179.25 0.222222 175.7256
17 180 179 0.222222 176.6755

The calculation discounts the weight of older valuations by a factor of (1-α) per period. In doing this, traders can use EMAs to smooth the previous price data in the hopes of identifying and exploiting an ongoing trend.

As you can imagine, performing the exponential moving average formula with a large data set would be incredibly time consuming. Fortunately, most trading platforms will be able to do these calculations for you almost instantaneously.

In the next section, we will show you how to use the exponential moving average indicator in both MetaTrader 4 (MT4) and MetaTrader 5 (MT5), both of which come with the EMA indicator by default.

How to Use the EMA Indicator MT4 and MT5

Fortunately, applying the EMA indicator in MT4 and MT5 is very straightforward. Here, we will show you how to use the EMA indicator for MT5 but, rest assured, the process is exactly the same in MT4.

In order to use the exponential moving average, you will have to locate the moving average indicator in the ‘Trend’ indicators folder within the Navigator window, as shown below.

Depicted: Admirals MetaTrader 5 – EMA Indicator Settings

The MA method field defines the type of moving average that you'll add to the chart, to add an EMA, you will need to select ‘Exponential’. The two other EMA indicator settings to fill out are ‘Period’ and ‘Shift’.

The period refers to the ‘look-back’ period over which the EMA indicator will be calculated. The larger the period, the smoother the line and, conversely, the smaller the period, the more responsible the exponential moving average indicator will be to changes in price.

Some typical EMA indicator settings are 10 and 25 for faster, more responsive curves; or 100 and 200 periods for smoother, slow-moving curves. For those who want an EMA indicator somewhere in the middle, a period of 50 might be more appropriate.

What about ‘Shift’? The shift setting works by offsetting the EMA indicator along the time axis by the number which you specify. The default value for this setting is 0, which is the best place for beginners to start.

The image below shows a 25-period Forex EMA indicator added to a daily GBP/USD chart.

Depicted: Admirals MetaTrader 5 – GBPUSD Daily Chart. Date Range: 25 February 2022 – 19 October 2022. Date Captured: 19 October 2022. Past performance is not a reliable indicator of future results.

Can you see how the exponential moving average indicator line is much smoother than the movements of the underlying price? It still traces the general movement of the market, but it effectively filters out price noise, showing us a clearer indication of the overriding trend.

The line of the EMA indicator guides us to the trend. Notice how we get a sustained downtrend after the price breaks below the EMA indicator line? This can often be the case and can sometimes interpreted as a trading signal. one of the key aspects of how to trade with the exponential moving average

An Exponential Moving Average Strategy

An even more effective way of producing trading signals is with a double exponential moving average strategy, using one short-term and one-long term EMA. This exponential moving average strategy creates a trading signal when the shorter EMA indicator crosses the longer one.

For example, a Forex trader might choose to use a 25-day EMA as the shorter EMA and a 100-day EMA as the longer one. With this exponential moving average crossover strategy, the trader would buy when the 25-day EMA crosses above the 100-day EMA, and sell when the 25-day EMA crosses below the 100-day EMA.

Depicted: Admirals MetaTrader 5 – AUDUSD Daily Chart. Date Range: 25 February 2022 – 19 October 2022. Date Captured: 19 October 2022. Past performance is not a reliable indicator of future results.

In the chart above, the green line represents the 25-day exponential moving average, whilst the red line is the longer 100-day EMA.

We can see that after briefly crossing above the 100-day EMA, the 25-day EMA drops back below. This second exponential moving average crossover was followed by a prolonged downtrend, which persevered until the time the image of the chart was captured. With this exponential moving average strategy, our exit signal is the same as our entry signal – when the shorter EMA crosses back over the longer EMA.

Final Thoughts

We have seen how we can use the EMA indicator to smooth price data and help find the trend in both MT4 and MT5.

Not only does this indicator help confirm the trend, but it can also be used to provide trading signals, as we saw with the exponential moving average crossover strategy.

As with all moving averages, you need to be aware that the EMA indicator is a lagging indicator. Because it utilises past data, the price will always be on the move before the EMA reacts. Generally speaking, an exponential moving average will respond quicker to newer data compared with an SMA, as it assigns more weight to more recent prices. The exact curve characteristics are governed by the period you choose.

A great way to determine what the best EMA indicator settings for your own trading style is by testing the different options in a free demo trading account.

Trade on a Risk-Free Demo Account

A demo trading account allows you to practise and perfect your exponential moving average strategy in a risk-free environment! Trade using virtual currency in realistic market conditions before heading over to the live markets! Click the banner below in order to open a free demo account today:

Trade with a risk-free demo account

Practise trading with virtual funds

About Admirals

Admirals is a multi-award winning, globally regulated Forex and CFD broker, offering trading on over 8,000 financial instruments via the world's most popular trading platforms: MetaTrader 4 and MetaTrader 5. Start trading today!

This material does not contain and should not be construed as containing investment advice, investment recommendations, an offer of, or recommendation for, any transactions in financial instruments. Please note that such trading analysis is not a reliable indicator for any current or future performance, as circumstances may change over time. Before making any investment decisions, you should seek advice from independent financial advisors to ensure you understand the risks


The MACD Trading Strategy, Explained
This article explains what the MACD indicator is and explores the various features of the MACD indicator, how to scalp with the MACD indicator, strategies that pair the MACD indicator with other indicators, the best indicator settings for a MACD trading strategy, MACD breakouts, MACD patterns, and m...
Trading With the ADX Indicator
This article will explain what the ADX indicator is, it will cover the Forex ADX indicator calculation in detail, it will take a look at the advanced Forex ADX indicator for MetaTrader 4 and MetaTrader 5, it will explain how to read the ADX indicator, how to measure trend strength, and much more!Som...
A Guide to Forex Day Trading Signals
Forex signals are available to aid you in making higher profits and to make your Forex trading journey more successful. Whether you are an experienced trader, or a novice Forex trader, you will need Forex signals, as they make the whole trading process a lot easier. Forex trading can be very difficu...
View All