← Back to Library
Trend

Exponential Moving Average (EMA)

EMA places a greater weight and significance on the most recent data points. It reacts more significantly to recent price changes than a simple moving average.

Pine Script V6
//@version=6
indicator('EMA', overlay=true)
len = input.int(9, 'Length')
plot(ta.ema(close, len), 'EMA', color=color.yellow)