Moving averages
DEMA Indicator on a Live Gold Chart
The double EMA is an exponential average with the lag trimmed. It takes an EMA, takes an EMA of that EMA, and uses twice the first minus the second. On the gold candles below it tracks price noticeably tighter than an EMA would.
What it shows
One line, the DEMA, plotted on the candles. Set an EMA of the same length beside it and the DEMA is the one hugging price.
How Pravex works it out
- Work out an EMA of the source price over N candles, the close by default. Call it E1.
- Work out a second EMA over the same N candles, this time of E1 itself. Call it E2. E2 trails E1.
- DEMA = 2 × E1 − E2. Subtracting the trailing copy cancels part of the delay that E1 has behind price.
- The line starts later than a plain EMA, roughly twice the length into the data, because E2 needs E1 to exist first.
Settings
| Setting | Default | What changing it does |
|---|---|---|
| Length | 9 | The length used for both EMAs. A shorter length hugs price and flips often; a longer one is calmer and still quicker than a plain EMA of that length. |
| Source | close | The price both EMAs are built from. The subtraction amplifies whatever you feed in, so a calmer source such as hlc3 tames some of the overshoot. |
How traders read it
The DEMA is used where a plain EMA feels too slow. Its slope turns sooner, so a change in direction shows up a few candles earlier on gold.
Traders read it like any trend line: price above a rising DEMA leans up and price below a falling one leans down. Some use two lengths and watch for the crossing.
When it misleads
Cutting lag has a price. The subtraction also amplifies noise, so the DEMA overshoots at sharp turns and then curls back, and it flips more in a sideways market than an EMA does. It needs about twice its length in loaded candles before the first point appears, so on a short history the line starts late.
Questions and answers
What does DEMA stand for?
Double exponential moving average. Pravex calls it Double EMA and computes it as 2 × EMA − EMA of the EMA.
Is the DEMA twice as fast as the EMA?
No. It is the same length with part of the lag taken out, so it turns sooner but not twice as quickly.
Why does the DEMA start later than an EMA?
Its second EMA is taken of the first, so it only begins once the first has N values, and then needs N of its own. At length 9 the first point lands around candle 17.
DEMA or TEMA?
The TEMA adds a third EMA and cancels more lag, so it reacts quicker still and overshoots more. The DEMA is the middle ground between a plain EMA and the TEMA.
Related: Triple EMA, Moving Average Exponential, Hull Moving Average, Simple Moving Average, every indicator.
Not financial advice. Read our disclaimer.
Pro charts. Zero paywalls.
Charts for gold, oil, US indices and crypto, with every tool free to use.
Open the chartNo card, no trial, no upgrade pop-ups.