A faster-reacting moving average derived from a double-smoothing trick: take the EMA, then take the EMA of that, then subtract the second from twice the first. The result tracks price more closely than a standard EMA without becoming raw price.
DEMA(14) leading EMA(14) into a trend reversal on MES 5m
What it measures
- Trend direction with reduced lag. Reacts to price changes ~30–50% faster than a same-period EMA.
- Smoothed price reference. Still smooth enough to act as a dynamic support/resistance line, unlike raw price.
- Momentum acceleration. The slope flips earlier than an EMA slope at the same period — useful when you want earlier confirmation.
Formula
How AlgoLift computes it
DEMA = (2 × EMA1) − EMA2
Where EMA1 is the standard EMA over the chosen period, and EMA2 is the EMA of EMA1 over the same period. The subtraction cancels most of the lag introduced by the first smoothing pass.
A 14-period DEMA reacts roughly as fast as a 7-period EMA but with smoother output. The double-smoothing trick was introduced by Patrick Mulloy in 1994 — see also TEMA for the three-level version.
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Period | 14 | 2–500 | Lookback in bars. Note the default differs from EMA's default of 20 — DEMA's faster reaction means shorter periods are common. |
Recommended periods
- 5–10 (fast): Aggressive scalping signals. Comparable in reaction speed to EMA(3)–EMA(5) but smoother.
- 14 (default): Intraday day-trading. Good middle ground.
- 20–30 (medium): Swing trend filter. The reduced lag matters less here, so you might as well use EMA unless the smoother output is specifically wanted.
DEMA's lag reduction is most valuable at short-to-medium periods. At long periods (50+), the benefit shrinks.
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| DEMA | Numeric | Always | The DEMA line. Plotted directly against price. |
| Slope | Numeric | On select | Bar-over-bar change in DEMA. Flips direction earlier than EMA slope at the same period. |
DEMA node — default state
How to read it
- Price above DEMA: Up-state — interpreted the same as EMA, with the difference being that DEMA confirms the state earlier.
- Price below DEMA: Down-state.
- DEMA slope flip: Often precedes the equivalent EMA slope flip by 1–3 bars at the same period. This early-warning property is the main reason to use DEMA.
- DEMA crossover with another DEMA: Faster than EMA crossover but also more prone to whipsaws in chop. Always pair with a Cooldown or a regime filter.
DEMA's value is faster signal confirmation. Use it when EMA is too slow and raw price is too noisy. If you don't have a specific reason to need the speed, the EMA is the safer default.
Best in / worst in
Best in intraday trend-following on liquid instruments, especially around session opens where reaction speed matters. Pairs well with shorter-bar timeframes (1m–5m).
Worst in sideways chop and around news events where price whipsaws. DEMA's faster reaction means it crosses more often than EMA, which translates directly into more false signals if not filtered.
Three setups
1. DEMA pullback entry
Use DEMA as a dynamic pullback target in a confirmed trend.
- Long: DEMA(14) slope positive (uptrend) AND price touches within 1 ATR of DEMA AND price closes back above DEMA.
- Short: Symmetric.
The faster reaction lets you catch the pullback closer to its real turning point than an EMA-based version would.
DEMA pullback entry with slope confirmation
2. DEMA / EMA combo crossover
A two-MA crossover where DEMA leads. Fires earlier than two-EMA pairs but with more false signals — best with a regime filter.
- Long: DEMA(14) crosses above EMA(50) AND price > SMA(200).
- Short: Inverse with price < SMA(200).
3. DEMA slope as a momentum trigger
Skip the absolute value entirely — use only the slope.
- Long: DEMA(14) slope was negative for 5+ bars AND just turned positive.
- Short: Symmetric.
This captures the moment momentum genuinely shifts, not just when price drifts above a line.
Advanced patterns in AlgoLift
DEMA on execution timeframe, SMA on regime timeframe. Use DEMA for fast signal generation on a 5m chart but gate every entry by SMA(200) on a daily chart. The combination gets you reactive entries while keeping the long-horizon trend protecting your downside. Wire both as separate data series in the Visual Builder.
Scale-in on DEMA slope acceleration. Use the initial DEMA slope flip as your first entry. Then use a Scaled Entry that fires when DEMA slope crosses a higher threshold (i.e., the trend is accelerating). Adds to winning positions while leaving you out of trades that flatten quickly. See scaling positions.
Common mistakes
- Treating DEMA's speed as strictly better than EMA. Faster reaction means more whipsaws. The right indicator depends on what you're filtering against — for a wide-stop swing strategy, the EMA's extra smoothing is usually preferable.
- Stacking DEMA periods like EMA pairs. DEMA(14) crossing DEMA(28) is interesting but rarely outperforms a DEMA(14) / EMA(50) combo. The faster line should be the faster type, not just the shorter period.
- Skipping the cooldown. DEMA's faster reaction makes crossover machine-gunning even worse than with EMA. Always wire a Cooldown condition into the Entry node.