EMA
Indicator
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.
Price is under a falling EMA 9. Short-term trend points down.
EMA 9 66,387.8 · Close 65,242.2
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.
Price above a rising EMA
Closes stay above the line while it slopes up. The short-term trend is up.
Close crosses below
After a run above the line, price closes under it. Short-term momentum is turning down.
Close crosses above
After a run below the line, price closes above it. Many traders want the EMA to turn up as well.
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
The EMA goes sideways and price keeps crossing it. There is no trend for the line to follow.
EMA formulaHow it is calculated.
Pick the weight
With a length of 9, the weight is 2 / (9 + 1) = 0.2. The newest close gets 20% of the say.
Start from a simple average
The first value is the plain average of the first 9 closes, as TradingView does.
Blend each new close
Every bar after that: new EMA = 0.2 x close + 0.8 x previous EMA.
EMA settingsEvery setting, explained.
| Setting | Default | Range | What it changes |
|---|---|---|---|
| Length | 9 | 1 to 10,000 (typical 9 to 200) | How many bars the average spans. Shorter follows price more closely, longer is smoother. |
| Source | Close | Any price, or volume | Which values feed the calculation. HL2 or HLC3 reduce the effect of a single close. |
| Line | Blue #2962FF, 1 px | Any colour and width | Colour 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.
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
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
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
Requiring the line itself to turn up removes many crosses that happen in a flat market.
EMA mistakesCommon mistakes.
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.
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.
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 indicatorsTry EMA on a live chart.
Free. No download.
Works in your browser and on iPhone too.