ema
Exponential moving average
Reference/Moving averages/Function
ema(source, length)
Newer bars weigh more, so EMA turns faster than SMA. Short form `ema(9)` uses close.
Parameters
| Name | Type | Description |
|---|---|---|
sourceoptional | series default close | Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9). |
length | int default 9 | Lookback in bars. Default 9. |
Return value
series
Short form: if the first argument is a number, Dovee uses close as the source.
Example
line = ema(close, 9) plot line as "Exponential moving average"