TREND, MOVING AVERAGES & STRUCTURE

DEMA

A trend line that turns faster than a normal exponential average, with less of the lag that makes moving averages arrive late.

spec id: demalength (default 20)

What does DEMA measure?

A trend line that turns faster than a normal exponential average, with less of the lag that makes moving averages arrive late.

How is DEMA calculated?

Take a 20-candle exponential average of the close, then take an exponential average OF that line. Double the first and subtract the second — the subtraction cancels most of the delay.

Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.

How do I use DEMA in a bot?

In the builder, add an indicator of type dema (parameters: length, default 20). Its value becomes an operand you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.

Related indicators

Or browse all 158 indicators in the full library.

Build a bot that trades on DEMA — the first backtest is free.

Run a free backtest