Momentum indicator

Detrended Price Oscillator: Finding Cycles Inside the Trend

The Detrended Price Oscillator (DPO) compares the close with a 20 period simple average taken from 11 candles earlier, which strips out the longer trend and leaves the shorter swings. Above zero price is above its recent average cycle; regular peaks and troughs in the DPO show the typical length of a swing, which helps time entries inside a trend.

No card for the live chart7 days freeCancel any time

WickSpeak reads it

What it isHow to trade itWhat proves it wrong
Illustration

What it is

Most oscillators measure momentum. The DPO is different: it is designed to remove the trend so you can see the cycle underneath. By comparing price with an average from about half a period ago, it cancels the slow drift and highlights how far price has swung either side of it.

Because it uses an older average, the DPO is not meant for spotting the trend or real-time breakouts. It is a tool for measuring cycles: how many candles typically pass between swing lows, so you can anticipate the next one.

How it is calculated

1. Work out a 20 period simple moving average of the close. 2. Find the shift: 20 divided by 2, plus 1, which is 11 candles. 3. DPO = the latest close minus the average as it was 11 candles ago. 4. Plot it around a zero line.

Settings

SettingDefaultRangeWhat it changes
Length202 to 300The cycle length you want to isolate. The shift back is half of this plus one.

How to read it

Above zeroPrice is above its recent cycle average. The swing is in its upper half.
Below zeroPrice is in the lower half of its cycle.
Regular peaks and troughsA clear cycle. The distance between troughs is the typical swing length.
Crossing above zeroA new upswing in the cycle has begun.
Irregular, shapeless lineNo dominant cycle at this length. Try a different length or another tool.

How to trade it

  1. 1

    On a 1 hour gold chart, count candles between the last three DPO troughs to find the typical cycle length.

  2. 2

    In an uptrend, expect the next swing low around that many candles after the last one, and watch for DPO to turn up from below zero.

  3. 3

    Buy when DPO crosses above zero or when a bullish candle forms near the expected cycle low.

  4. 4

    Place the stop below the cycle low, often 10 to 15 points on 1 hour gold.

  5. 5

    Target the previous cycle high or exit when DPO reaches a peak similar to the last one.

What proves it wrong

A cycle-low buy is proved wrong if price closes below the cycle low, or the expected low arrives and DPO keeps falling well past its previous troughs.

How WickSpeak reads Detrended price

WickSpeak runs in your browser with nothing to install. When you add the Detrended Price Oscillator, it writes a plain-English reading on the live candle: what the indicator is, what it is doing right now, how to trade it and what would prove that reading wrong. It says whether price is in the upper or lower half of its cycle and whether the swing is turning.

In Playbook, our no-code strategy builder, the DPO can be a condition in a play. It can test whether the DPO: crosses above zero; crosses below zero; is above zero; is below zero; is rising; is falling. Each condition can run on any of 12 timeframes from 1 minute to weekly, combined with up to 11 others, and the play can be backtested on past candles with your own costs and turned into alerts on screen, by email or by phone push.

Best markets and timeframes

Best on markets with fairly regular swings, often gold and major forex pairs, on 1 hour to daily charts.

Common mistakes

  • Using it as a trend indicator. It is designed to remove the trend.
  • Expecting cycles to repeat exactly; they drift.
  • Comparing DPO values across markets; it reads in price units.

Works well with

Questions traders ask

What does the Detrended Price Oscillator show?

It shows price relative to a shifted moving average, which removes the longer trend and leaves the shorter swings. It is used to measure cycle length and spot cycle highs and lows.

Why is the DPO shifted?

Comparing price with an average from about half a period earlier cancels most of the trend. In the standard version the shift is the length divided by 2, plus 1.

What is the best DPO setting?

20 is the common default. Set it close to the cycle length you want to see; if swings on your chart last about 30 candles, try 30.

Is the DPO a momentum indicator?

Not really. It is a cycle tool. It measures position within a swing rather than the speed of the move.

Read Detrended price on a live chart

WickSpeak writes what Detrended price is doing on every candle, how to trade it and what proves it wrong. Free for 30 minutes, no account.