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
- DeMark pivotsA support and resistance pair built from yesterday's candle, with a twist: the level shifts depending on whether yesterday closed up or down.
- Donchian channelA channel drawn straight through the recent highs and lows.
- Directional indexThe raw, unsmoothed strength reading that ADX is built from.
- Exp Hull MAA Hull-style trend line built from exponential averages: fast to turn, and smooth on the way.
Or browse all 158 indicators in the full library.