Detrended Price Oscillator
The Detrended Price Oscillator (DPO) removes the trend from price by comparing it with a past-shifted moving average, making short-term cycles and their peaks and troughs easier to see.
Formula
DPO = Close (shifted back n/2 + 1 periods) − SMA(n)
Explained
Because the average is displaced back in time, DPO is not aligned with the latest bar and is not meant for real-time signals. It is used to measure the typical length between cycle highs and lows.
Traders then use that cycle length to set the period of other indicators or to anticipate the next turning window.
Example
On a daily chart, DPO(20) shows lows roughly every 18–22 bars.
A swing trader expects the next cycle low around three weeks after the last one.
Common mistakes
Using DPO crosses as live trading signals.
Assuming cycles are perfectly regular.
Forgetting the displacement when reading the chart.
Questions traders ask
Why is DPO shifted?
Shifting removes the lag of the moving average so the detrended values line up with the cycles they describe.
What period should I use?
Choose a period close to the cycle you want to isolate, commonly 20.