Double exponential moving average

demamoving_averagesForge API 1

Exponential average with part of its lag removed.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint141 to 5000

Outputs

NameTypeRequiredDescription
demavalueOptionalcolor 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.