Exponential Moving Average (EMA)

EMA
Indicator

TrendOn the price chartFree on ChartLabs

The EMA is an average of recent closes that gives the newest bars the most weight. It follows price closely and shows the short-term trend at a glance.

A classic of technical analysis. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIEMAchartlabs.co/charts
Atlas reads it

Price is under a falling EMA 9. Short-term trend points down.

EMA 9 66,387.8 · Close 65,242.2

Atlas reads it

Price is under a falling EMA 9. Short-term trend points down.

EMA 9 66,387.8 · Close 65,242.2

Illustration on simulated data.

Exponential Moving Average (EMA)What is the EMA indicator?

The EMA draws one blue line on the price chart. By default it averages the last 9 closes, but unlike a simple average it counts the latest close more heavily than older ones.

Each new value moves part of the way from the previous EMA toward the new close. With a length of 9 that step is 20% of the gap, so a sudden move shows up in the line within a few bars, faster than an SMA of the same length.

When price stays above a rising EMA, the short-term trend points up. When it stays below a falling one, it points down. A flat EMA with price crossing back and forth means there is no clear trend.

Popular lengths

9 and 21 are common for short-term trading. 50 and 200 are widely watched on daily charts. Longer lengths are smoother and slower.

EMA or SMA?

The EMA reacts faster because recent closes count more. The SMA weights every bar equally, so it is smoother but turns later.

EMA signalsFive patterns to know.

1Bullish

Price above a rising EMA

Closes stay above the line while it slopes up. The short-term trend is up.

2Bearish lean

Close crosses below

After a run above the line, price closes under it. Short-term momentum is turning down.

3Bullish lean

Close crosses above

After a run below the line, price closes above it. Many traders want the EMA to turn up as well.

4Bullish

Pullback that holds

In an uptrend, price dips to the EMA and closes back above it. Buyers are defending the trend.

Flat line, many crosses
5Inconclusive

Flat line, many crosses

The EMA goes sideways and price keeps crossing it. There is no trend for the line to follow.

EMA formulaHow it is calculated.

α=2N+1EMAt=α×closet+(1−α)×EMAt−1
STEP 1

Pick the weight

With a length of 9, the weight is 2 / (9 + 1) = 0.2. The newest close gets 20% of the say.

STEP 2

Start from a simple average

The first value is the plain average of the first 9 closes, as TradingView does.

STEP 3

Blend each new close

Every bar after that: new EMA = 0.2 x close + 0.8 x previous EMA.

EMA settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Length91 to 10,000 (typical 9 to 200)How many bars the average spans. Shorter follows price more closely, longer is smoother.
SourceCloseAny price, or volumeWhich values feed the calculation. HL2 or HLC3 reduce the effect of a single close.
LineBlue #2962FF, 1 pxAny colour and widthColour and width of the line. Add a second EMA for a crossover setup.
Setting
Length
Default
9
Range
1 to 10,000 (typical 9 to 200)
What it changes
How many bars the average spans. Shorter follows price more closely, longer is smoother.
Setting
Source
Default
Close
Range
Any price, or volume
What it changes
Which values feed the calculation. HL2 or HLC3 reduce the effect of a single close.
Setting
Line
Default
Blue #2962FF, 1 px
Range
Any colour and width
What it changes
Colour and width of the line. Add a second EMA for a crossover setup.
922 price crosses in view
70,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

EMA strategiesUse it in 3 setups.

Pullback to the EMA in a trend

WhileEMAslopes upifprice dips to it and closes above

Traders often use a rising EMA as a pullback area and wait for a close back above it rather than buying the first touch.

Fast EMA crosses a slower one

IfEMA 9crosses aboveEMA 21exit whenit crosses back

Two EMAs filter out some of the noise of price crossing a single line. The 21 is drawn here in orange.

Close above, with the slope

Ifprice closes aboveEMAandEMAis turning up

Requiring the line itself to turn up removes many crosses that happen in a flat market.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

EMA mistakesCommon mistakes.

Flat line, many crosses

Trading every cross in a range

When the EMA is flat, price crosses it constantly. Check the slope before treating a cross as a trend change.

Cross comes after the low

Expecting the cross to catch the turn

Any average lags. The cross comes after the low, sometimes well after. That is the price of filtering noise.

Far above the line

Buying far above the line

When price runs far from the EMA, it often drifts back toward it. Many traders wait for a pullback instead of chasing.

EMA combinationsPair it with these.

EMA FAQQuestions traders ask.

What is the best EMA length?

It depends on the timeframe and style. 9 is the ChartLabs default. 20 or 21 is common for swing trading, and 50 and 200 are widely watched on daily charts.

EMA or SMA: which is better?

Neither is better in general. The EMA reacts faster because recent closes weigh more. The SMA is smoother and turns later. Pick the one that fits how quickly you want the line to respond.

What does price above the EMA mean?

Recent closes are higher than the weighted average of the last few bars, so the short-term trend points up. Many traders also check that the line is rising.

What is an EMA crossover?

A shorter EMA crossing a longer one, such as the 9 above the 21. It is a common trend-change trigger, but it lags and gives false signals in ranges.

What is the 200 EMA used for?

It is a slow line many traders use as a long-term trend filter: longs above it, shorts below it. Add an EMA with Length 200 to see it.

How is the EMA started?

The first value is the simple average of the first N closes. After that each value blends the new close with the previous EMA. This matches TradingView.

Does the EMA work on crypto?

Yes. It works on any market with prices. Crypto trades all day, so EMAs on hourly charts run without session gaps.

Is the EMA leading or lagging?

Lagging. It is built from past closes. It lags less than an SMA of the same length, but it still turns after price does.

Does the EMA repaint?

No. Values on closed bars never change. The live bar moves until it closes.

Why is my EMA different from another platform?

Usually the length, source or start differs, or a different amount of history is loaded. Older bars still have a small effect on an EMA, so more history can shift early values slightly.

Related indicatorsMore trend tools.

All trend indicators

Try EMA on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
EMA (9, close)