What is EMA?
A moving average is a line that shows the average price over a set number of recent candles. The period is the number of candles used. The exponential moving average (EMA) is a moving average that gives more weight to recent prices and less to older ones. Because of this, it turns faster than a simple average when price changes direction.
The EMA does not predict price. It summarises what price has already done. It is a lagging indicator: it always reacts after the move has started.
Ready to try it on a real or demo account?
Partner link · trading carries a high risk of loss
EMA vs SMA
| Point | SMA | EMA |
|---|---|---|
| Weighting | Every candle in the period counts equally | Recent candles count more |
| Reaction to new prices | Slower | Faster |
| Old data | Drops out completely when it leaves the period | Fades gradually and never fully disappears |
| Noise | Smoother | More sensitive to sharp spikes |
The SMA moves in steps as old candles leave the window, which can make it jump when a large old candle drops out. The EMA avoids that effect, but a single strong recent candle pulls it harder. The WMA sits between the two. It weights recent prices more, but in a straight-line way rather than an exponential one.
Formula
Each new EMA value is the previous EMA plus a fraction of the gap between the new price and that previous EMA:
EMA now = EMA previous + k × (Price now − EMA previous)
- k is the smoothing factor. MetaTrader calculates it from the period you choose. A shorter period gives a larger k, so the line reacts faster. A longer period gives a smaller k, so the line is smoother.
- Price is usually the close, but you can apply the EMA to the open, high, low, median or typical price.
- Starting value: the calculation needs a seed at the start of the chart history. Platforms seed it differently, often with an SMA or the first available price. This is why EMA values can differ slightly between platforms, or when little history is loaded.
How to add the EMA in MT4 and MT5
The steps below follow the standard MetaTrader menus. Your build may look slightly different.
- Open a chart in MetaTrader 4 or MetaTrader 5.
- Go to Insert → Indicators → Trend → Moving Average. You can also drag "Moving Average" from the Navigator onto the chart.
- Set MA method to Exponential. The default method is Simple, so check this field.
- Choose the Period, the Apply to price (usually Close) and, if needed, a Shift. Shift moves the line forward on the chart. Leave it at zero unless you have a reason to change it.
- Pick a colour and style, then confirm.
You can add several EMAs with different periods to the same chart. Practising on a demo account lets you test settings without real money.
How to read the EMA
The drawn example below uses no real prices:
- Before A: price stays above a rising EMA. This is a common picture of an uptrend.
- At B: price falls through the EMA, and the line flattens. The trend is weakening or pausing. This is not proof of a reversal.
- Around C: price crosses back and forth over a flat EMA. This is a range. In a range, crossings carry little meaning.
Common ways traders use the line:
- Direction: the slope of the EMA shows the recent bias.
- Distance: price far from the EMA means the move has stretched. Price close to it means the market is quiet or consolidating.
- Dynamic support and resistance: in trends, price often pulls back towards the EMA. See dynamic support and pullbacks.
- Crossovers: a faster EMA crossing a slower one. See MA crossover.
- Building block: the EMA sits inside other indicators, such as MACD, TRIX and Keltner Channels.
Choosing parameters
There is no correct period. The choice is a trade-off:
- Short period: reacts quickly, follows price closely, and gives many false turns.
- Long period: filters noise, but turns late. By the time it turns, much of the move may have passed.
- Timeframe matters more than the number: the same period covers a very different span of time on a minute chart and on a daily chart. Many traders check a higher timeframe EMA for context. See multiple timeframes.
- Applied price: Close is standard. Using the median or typical price reduces the effect of wicks.
- Avoid curve fitting: tuning the period until past charts look perfect usually produces a setting that fails on new data.
Where the EMA misleads
- Sideways markets: the line flattens and price crosses it repeatedly. Any "EMA strategy" based on crossings produces a run of false signals here. The ADX can help you judge whether a trend is present at all.
- News spikes: a single large candle pulls a short EMA sharply. The line then shows a "trend" that was only one event.
- Gaps and thin sessions: weekend gaps and low-liquidity hours distort the average.
- Lag at turning points: the EMA confirms a reversal only after price has already moved. Fast reversals can be over before the line turns.
- Short history and seeding: on newly loaded charts, early EMA values depend on the starting method and may not match other platforms.
- Self-fulfilling crowding: popular EMA levels attract orders. Price may react there for a moment and then move straight through.
- Changing volatility: a period that fits a calm market lags in a fast one, and the reverse. Check volatility with the ATR.
Risk and the EMA
An EMA is a description of past prices, not a trading system. Leveraged forex and CFD trading can lose money fast, including when every indicator seems to agree. Decide your position size and stop placement first. See risk management and the wider technical analysis section.
Frequently asked questions
What is EMA in simple words?
It is an average of recent prices that gives more weight to the latest candles. Because of that weighting, it follows price more closely than a simple average.
Is the EMA better than the SMA?
Neither is better. The EMA reacts faster and is noisier. The SMA is smoother and slower. Which one suits you depends on your timeframe and method.
Which EMA period should I use?
There is no standard answer. Shorter periods react faster and give more false turns. Longer periods filter noise but lag. Test your settings on a demo account before using them with real money.
Why does my EMA differ from another platform's?
The difference usually comes from the applied price, the amount of loaded history, or how the platform seeds the starting value.
Does an EMA strategy work on its own?
An EMA cannot identify ranges, news risk or position size. Traders usually combine it with price structure and strict risk limits. It offers no guarantee of results.
