zlema
Zero-lag EMA
Reference/Moving averages/Function
zlema(source, length)
EMA with a lag-reducing error term. Short form `zlema(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 = zlema(close, 9) plot line as "Zero-lag EMA"