
Detrended Price Oscillator: How It Measures Price Cycles
Learn how the detrended price oscillator removes long-term trends to isolate short-term price cycles. Read the full guide.
By Trader Faculty Team
Direct Answer
The Detrended Price Oscillator (DPO) is a technical indicator that subtracts a backward-shifted moving average from historical price to remove long-term trends and highlight shorter-term price cycles. Because its calculation shifts backward in time, traders use it to estimate typical cycle lengths and spot relative cycle highs and lows rather than generate live entry signals.
A Detrended Price Oscillator (DPO) is a technical analysis tool that removes the long-term price trend from a chart so you can see shorter-term price cycles more clearly.
Most standard oscillators stay stuck near extreme high or low levels when a market climbs or drops for weeks, making it hard to spot normal swings. Stripping out the broader trend solves that problem by centering short-term waves around a zero line. This guide covers what the Detrended Price Oscillator is, how its backward-shifted formula works, how to read cycle length, how it differs from momentum tools, and the common traps to avoid.
Quick Takeaways
- The Detrended Price Oscillator isolates short-term price cycles by subtracting a backward-shifted moving average from past price.
- Because the calculation shifts backward in time, DPO is a historical cycle ruler rather than a real-time buy or sell signal.
- DPO has no fixed upper or lower limit, so traders compare current readings against past peaks and troughs on the same chart.
- Pairing DPO with a trend or momentum tool helps prevent false reversal trades when the broader market is moving strongly in one direction.
What Is the Detrended Price Oscillator?
The Detrended Price Oscillator is an unbounded cycle indicator that measures the distance between a past price and a displaced moving average to highlight repeating highs and lows. Unlike bounded oscillators that move between 0 and 100, DPO fluctuates above and below a zero centerline with no fixed ceiling or floor.
To understand what is detrended price oscillator analysis doing on a chart, picture watching ocean waves rolling onto a beach while the tide rises. If you only measure water height from the dry sand, the rising tide hides the true size of each individual wave. Removing the tide lets you measure every wave crest and trough cleanly on a flat level.
In trading, the long-term trend acts like the tide, while short-term price swings act like the waves. By stripping out the broader trend, the Detrended Price Oscillator leaves behind only the short-term price waves that sit shorter than your chosen lookback period.
How the Detrended Price Oscillator Formula Works
The Detrended Price Oscillator calculates the difference between a historical closing price and a simple moving average (SMA — an average of closing prices over a set number of bars) shifted back in time. Most charting platforms set the default lookback period to 20 or 21 bars, which roughly equals one trading month on a daily chart.
Here is the plain-text formula:
DPO = Closing Price from (n / 2 + 1) periods ago - n-period Simple Moving Average
In this formula, n is the lookback period you choose, Closing Price from (n / 2 + 1) periods ago is the price bar shifted backward by half the period plus one bar, and n-period Simple Moving Average is the average closing price across all n periods.

Suppose you use a 20-period DPO on a daily stock chart. First, divide 20 by 2 and add 1, which gives 11 bars. Next, take the closing price from 11 trading days ago and subtract today's 20-day simple moving average. If the closing price 11 days ago was $54 and the 20-day average is $50, the DPO reading is +$4.
This backward shift explains why DPO behaves differently from standard chart tools. When a charting platform plots DPO centered on the price bars it actually measures, the indicator line stops 11 bars before the current candle, leaving a blank gap on the right edge of the chart. Some platforms shift the plot forward so the line reaches the latest bar, which means the final reading actually reflects a price from 11 bars earlier rather than live price action. Either way, DPO measures past cycles rather than live momentum.
How Traders Read DPO Cycles
Traders read the Detrended Price Oscillator around its zero line to estimate average cycle length and spot relative cycle highs and lows. When you look at the detrended price oscillator explained on a chart, the indicator acts like a ruler placed across past price waves rather than a trigger for immediate entries.

Here is how traders typically read the indicator across a chart:
- Measure peak-to-peak and trough-to-trough distance: Count the number of bars between two clear DPO peaks or two clear DPO troughs. Repeating this across several waves gives an estimate of how long a typical short-term cycle lasts on that asset.
- Watch zero-line crosses: When DPO crosses above zero, the past price being measured was higher than its moving average. When DPO drops below zero, that price was lower than its moving average.
- Compare relative cycle extremes: Because DPO is unbounded, traders look left on the chart to see where previous cycle peaks and troughs turned around, treating similar levels as relative overbought (stretched high) or oversold (stretched low) areas.
Detrended Price Oscillator vs. Momentum Oscillators
While both tools sit in a separate window below a price chart, the Detrended Price Oscillator measures historical price cycles, whereas a momentum tool like the Percentage Price Oscillator measures the live speed and direction of a trend. Mixing up their jobs often leads traders to misread what the indicator is telling them.
| Feature | Detrended Price Oscillator (DPO) | Percentage Price Oscillator (PPO) |
|---|---|---|
| Primary purpose | Isolates short-term price cycles | Measures live trend momentum |
| Calculation timing | Shifted backward by (n / 2 + 1) bars | Calculated on the current live bar |
| Vertical scale | Unbounded price units (e.g., dollars or pips) | Unbounded percentage difference |
| Best market condition | Ranging or steady cyclical markets | Trending markets with clear swings |
Because DPO uses raw price differences instead of percentages, a $200 stock will naturally produce much larger DPO swings than a $20 stock. Percentage-based oscillators normalize those moves into percentages, making it easier to compare momentum across different assets or timeframes.
Common Mistakes When Using the Detrended Price Oscillator
The biggest mistake traders make with the Detrended Price Oscillator is treating a backward-shifted cycle tool like a real-time buy or sell signal. Because DPO removes the main trend, relying on it alone can expose your account to sharp losses when a strong trend takes over.
Watch out for these three common errors:
- Falling for the hindsight illusion: On a historical chart, DPO peaks and troughs often look like they line up cleanly with price tops and bottoms. That visual neatness happens because the indicator was shifted backward after the move already occurred, not because it predicted the turn in real time.
- Trading against a strong trend: Removing the trend hides whether buyers or sellers are firmly in control. Selling just because DPO reaches a past peak during a strong uptrend often leads to early exits or repeated losses as price keeps climbing.
- Ignoring the lookback mismatch: Leaving DPO on a default 20-period setting without checking the asset's actual wave length can create choppy, noisy readings that fail to capture the true rhythm of the chart.
Conclusion
The Detrended Price Oscillator helps you strip away long-term trends so you can measure short-term price cycles and estimate typical wave lengths on a chart. Because its formula shifts backward in time, it works best as a background cycle ruler paired with trend and momentum technical indicators rather than a standalone signal to enter or exit a trade. Before adding DPO to your live charts, test how different lookback periods match the natural rhythm of the markets you follow. Trading always carries the risk of losing money, so treat everything in this guide as educational background for your own research rather than personal trading advice.
Frequently Asked Questions
Is the Detrended Price Oscillator a leading or lagging indicator?
The Detrended Price Oscillator is neither a leading nor a real-time lagging momentum indicator. Because its formula shifts the moving average comparison backward by half the lookback period plus one bar, it acts as a historical cycle measurement tool rather than a live timing trigger.
Why does the Detrended Price Oscillator stop before the end of my chart?
On charting platforms that plot DPO centered on the actual bars being measured, the line stops (n / 2) + 1 bars before the current candle. That blank gap happens because the calculation needs future bars to center the moving average, leaving the most recent bars without a live reading.
What is the best period setting for the Detrended Price Oscillator?
Most charting platforms use a default setting of 20 or 21 periods, which matches roughly one trading month on a daily chart. However, traders often adjust the lookback period to match the average peak-to-peak cycle length they observe on the specific chart they are studying.
How is the Detrended Price Oscillator different from RSI?
The Relative Strength Index (RSI) measures real-time price momentum on a fixed scale from 0 to 100, whereas the Detrended Price Oscillator measures historical price cycles around a zero line with no upper or lower limit. DPO removes the main trend, while RSI reflects ongoing buying and selling pressure.
Can you use the Detrended Price Oscillator by itself to buy and sell?
Using the Detrended Price Oscillator alone is risky because removing the long-term trend hides the broader market direction. Traders typically combine DPO with a trend filter, such as a long-term moving average, and a real-time momentum indicator to avoid trading against strong trends.
Keep learning
TA Masterclass
Reading charts one article at a time? Get the full method, in order.
10 lessons quiz
Start TA MasterclassThe Trader Faculty Team writes and reviews every guide together — pairing hands-on market experience with a curriculum-first approach to trading education. One good syllabus, taught in the order that makes you better.





