Detrended Price Oscillator
Cycle & extremes
The DPO removes the trend from the price to make the underlying cycle visible. It is thus explicitly not meant to follow trends.
Construction & calculation
- Take an SMA over 20 periods.
- Shift that SMA (20/2 + 1) = 11 bars backward.
- DPO = the closing price minus that shifted SMA.
DPO = C - SMA(20) shifted by (20/2 + 1) bars
Interpretation
- Because the trend component has been removed, the peaks and troughs become more regular — you see the cycle.
- Measure the distance between two successive peaks: that gives you the dominant cycle length of the stock.
- A DPO turning up from a trough points to the start of a new upward cycle phase.
How the signal works in this scanner
Buy signal (green)The DPO is below zero and has started rising from its trough within the last 15 bars: the cycle is turning up.
Sell signal (red)The DPO is above zero and has started falling from its peak: the cycle is turning down.
Watch-outs & pitfalls
- Because of the shift the DPO 'looks' into the past. The last bars are therefore less reliable by definition — that is inherent to the construction, not a flaw.
- Only works if the stock has a somewhat regular cycle. In a strong, linear trend the DPO is useless.