The Detrended Price Oscillator compares a past price with a moving average, so that the trend is taken out and only the shorter swings remain. In the common version, it takes the price from about half the lookback period ago, (n / 2 + 1) bars back, and subtracts the n-period simple moving average. With a 20-period setting, that means comparing the close from 11 bars ago with the 20-bar average.
The shift is the part people often miss. Because the oscillator is centred in the past, its latest value is describing a price that is already several bars old. That makes it a tool for measuring the rhythm of swings, not a timing tool for the current bar. It answers questions like "how long do pullbacks usually last on this pair at this time of day?" and "how far do swings typically extend above and below the average?"
For scalpers, that kind of information can be helpful when setting expectations. If the DPO shows that swings on M5 commonly run about 12 to 15 bars from peak to peak during London, a trade that has been going nowhere for 20 bars is outside the normal rhythm.
Some limitations to keep in mind:
- Cycles in forex are irregular. The DPO can show a neat rhythm for a week and then lose it completely.
- The lookback period strongly affects which swings appear. A short setting picks up tiny wiggles, a long one shows only larger waves.
- Some platforms shift the plot so it lines up with the bar it describes, others don't. It's worth checking which version you are looking at.
A practical use is to measure average swing duration and amplitude on your pair over a few months, then compare those with how long your trades are held.
Has anyone used the DPO or a similar detrending tool to study the timing of swings, and did the cycles hold steady enough to use?
The Detrended Price Oscillator: removing the trend to see the swings underneath
-
Shadow Trader
- Posts: 6144
- Joined: Wed Sep 09, 2026 5:19 pm