Momentum

Detrended Price Oscillator (DPO) on Gold

The Detrended Price Oscillator strips the trend out of price so the cycles are easier to see. It compares the close with a simple average from about half a window ago. Above zero price is above that older average, below zero it is under it.

Loading the live chart.

Close
–
Detrended Price Oscillator
–

Open the gold chart

What it shows

A wave around zero below the candles, measured in dollars of gold. With Centre on the past switched on, the wave slides 11 candles left so each value sits over the candle it describes.

How Pravex works it out

  1. Take the simple average of the close over 21 candles.
  2. Work out the look-back: back = 21 ÷ 2 rounded down, plus 1. At 21 that is 11 candles.
  3. Default (Centre on the past off): DPO = close now − the 21-candle average as it stood 11 candles ago.
  4. Centre on the past on: DPO = the close 11 candles ago − the average now. The line is then drawn 11 candles to the left so each value sits on the candle it describes, and it stops 11 candles before the last candle.
  5. With invented prices: a close of 105 against an average of 100 from 11 candles back gives +5.

Settings

SettingDefaultWhat changing it does
Length21How many candles go into the average, and how far back the comparison reaches. A shorter length picks out quicker swings, a longer one slower cycles.
Centre on the pastOffOff compares today’s close with an older average, so the line reaches the newest candle. On aligns each value with its own candle, which is tidier for studying past cycles but leaves the line short at the right edge.

How traders read it

Look at the peaks and troughs of the line, not at its level. The distance between two peaks shows how long the swings in this market take, and that suggests a length for other tools.

A zero-line cross says the close moved from one side of the older average to the other. A cross up usually lands near the end of a swing’s low part, since the close has climbed back over where the average stood half a window ago.

Heights are in price, so a $15 swing on gold this month and a $15 swing last year mean different things. Compare peaks only within the same stretch of the same chart.

When it misleads

The DPO is not made to show where price is going right now. With centring on, it cannot reach the newest candle, so it is only a tool for studying history. With centring off, the line compares price with a stale average, so a steady trend leaves the reading above zero for a long time. In a one-way market there are no clear cycles to find. Gold has no weekend candles, so a cycle counted in candles is not a cycle in calendar time: a weekend inside the window makes it span more days than it seems.

Questions and answers

What does the Detrended Price Oscillator do?

It subtracts an older moving average from price, which takes the trend out and leaves the swing around it.

Why does the DPO line stop short of the last candle?

That happens with Centre on the past switched on. Each value is then drawn 11 candles back, over the candle it describes, so the newest 11 candles have no value yet. A new point fills in with each closed candle; the ones already drawn stay put. Switch it off to keep the line up to the latest candle.

How do I pick a DPO length?

Count the candles between two swing lows you can see on the gold chart and set the length close to that number. The default of 21 suits swings of roughly a day on hourly candles.

Is the DPO a momentum indicator?

The app lists it with momentum tools, but it measures distance from an average, not speed. Read it as a cycle tool.

Related: Coppock Curve, Zig Zag, Rank Correlation Index, 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 chart

No card, no trial, no upgrade pop-ups.