Double exponential moving average
Exponential average with part of its lag removed.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| period | int | 14 | 1 to 5000 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| dema | value | Optional | color theme.accent, style line, width 1 |
- Warm-up
- 2 * period - 2 bars (26 at the defaults)
- Repaints
- No
- Parity
- MetaTrader 5, within 1e-12
Formula
DEMA = 2 * EMA(x) - EMA(EMA(x))
The second average starts at the bar where the first is defined. After a gap the whole calculation starts again.