Clarity Markets
ENEnglish
More languages coming soon
Opens in a new tab
Open Account
ENEnglish
More languages coming soon

Exponential moving average

A moving average that gives more weight to recent prices, so it reacts to a change in trend sooner than a simple average.

What an exponential moving average is.

A moving average that leans towards the latest prices.

An exponential moving average, or EMA, is a line that tracks the average price over a set period. Unlike a simple average, it gives the newest closes the most weight.

Older closes still count, but their influence fades a little with every new bar. So the EMA tends to turn sooner when the trend changes.

That speed is the trade-off. An EMA reacts faster than a simple moving average of the same period, but it also reacts more to short, noisy moves.

A 20-period EMA turning faster than the 20-period SMA as the trend changesEMA (20) and SMA (20)A 20-period EMA turning faster than the 20-period SMA as the trend changesEMA (20) and SMA (20)
Illustration on generated prices, not a real market. A 20-period EMA (orange) and a 20-period SMA (navy, dashed). After the low, the EMA turns up a little earlier and sits closer to price as the new rise begins.
TypeTrend indicator, drawn on the price chart
Built fromAn average of closes that gives recent bars more weight
Created byNo single inventor: a long-standing statistical method
Best known forTurning sooner than a simple average, and as the building block of MACD
On MetaTrader 5Insert, then Indicators, then Trend, then Moving Average, method Exponential

How it is calculated.

Each new value starts from the last one. Your platform does the maths for you.

01

Work out the multiplier.

The multiplier is 2 ÷ (period + 1). For a 20-period EMA that is 2 ÷ 21, or about 0.095.

02

Start from a first value.

The first EMA is usually the simple average of the first 20 closes. It gives the calculation a starting point.

03

Move part of the way to the new close.

On each new bar, take the gap between the close and the last EMA, and add about 9.5% of it.

04

Repeat on every bar.

Because each value builds on the last, every past close still counts a little, with its weight shrinking over time.

Multiplier k = 2 ÷ (n + 1)
EMA today = EMA yesterday + k × (close today − EMA yesterday)
For n = 20, k ≈ 0.095: each new close pulls the line about 9.5% of the way towards it
 Simple (SMA)Exponential (EMA)
WeightingEvery close counts the sameRecent closes count most
At a turnTurns laterTurns sooner
In a choppy marketSteadierMore false turns
Old pricesDrop out completely after n barsFade gradually and never fully disappear

How to read it.

How traders use an EMA. None of these is a signal on its own.

Direction and slope.

A rising EMA with price above it describes an uptrend. A falling EMA with price below it describes a downtrend.

Turning points.

In a steady trend, an EMA and an SMA of the same period lag by similar amounts. The difference shows at turns, where the EMA reacts first.

Two EMAs together.

A fast and a slow EMA, such as 12 and 26, are often plotted together. Their crossovers show momentum shifting from one side to the other.

Pullbacks to the line.

In a trend, some traders watch how price behaves when it dips back towards the EMA. A clean break through it can suggest the trend is weakening.

The gap between a 12-period and a 26-period EMA is the basis of the MACD indicator. Learning the EMA first makes MACD much easier to follow.

Common mistakes.

Where traders new to the EMA most often go wrong.

Assuming faster means better. A quicker line also reacts to noise, so it can give more false signals in a sideways market.

Comparing an EMA and an SMA with different periods, then calling the EMA faster. Compare the two with the same period.

Treating the line as a floor that must hold. Price can cut through an EMA without any warning.

Reading crossovers in isolation. A crossover describes momentum that has already shifted, not where price goes next.

Using it on MetaTrader 5.

The exponential moving average is built into MT5, on desktop, web and mobile.

01

Open a chart.

In MetaTrader 5, open the instrument and timeframe you want to study.

02

Add the indicator.

Go to Insert, then Indicators, then Trend, and choose Moving Average.

03

Set it to Exponential.

In the Parameters tab, set MA method to Exponential and the Apply to field to Close. Then enter the period you want, such as 20.

04

Pick a colour.

On the Parameters tab, choose a line colour you can tell apart from any other average on the chart.

05

Save it as a template.

Right-click the chart, choose Templates, then Save Template, so you can apply the same set-up to other charts.

An EMA describes what price has done. It does not predict what it will do next. Practise on the free demo first, and use risk management, such as a stop-loss, on every live trade. This guide is for education only and is not investment advice.

Questions, answered.

What traders ask most about exponential moving averages.

01Is an EMA better than an SMA?
Neither is better in every case. The EMA reacts sooner at turns. The SMA is steadier when the market is choppy.
02What period should I use?
Choose it for the timeframe you trade. Short periods, such as 9 or 12, react quickly. Longer ones, such as 50 or 200, describe the broader trend.
03Why does the EMA never fully forget old prices?
Each value is built from the one before, so every past close keeps a small weight. That weight shrinks with each new bar.
04Does the EMA work on forex?
You can add it to any chart on MT5, including FX, indices, commodities, shares and crypto CFDs. No indicator works every time, in any market.
05Can I practise with it first?
Yes. The free MT5 demo has the same indicators and live prices, with practice money instead of yours.

Practise it on a demo.

Put an EMA and an SMA of the same period on a free MT5 demo chart and compare their turns before trading real money.

Trading CFDs on a live account puts your capital at risk and you can lose money. A demo does not.

CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 80% of retail investor accounts lose money when trading CFDs.