Detrended Price Oscillator DPO
Strips out the trend to expose the market's underlying price cycles.
Quick answer: The Detrended Price Oscillator removes the trend from price by comparing a past price to a displaced moving average, isolating and highlighting the short-term cycles that trend-following indicators obscure.
In simple words
The DPO does something unusual: it deliberately ignores the trend. By comparing price from a set number of bars ago to a moving average shifted back in time, it filters out the long-term direction and leaves only the shorter-term oscillations — the peaks and troughs of the market's cycles. It is not a momentum or trend tool; it is a cycle tool. Traders use it to estimate how long a market's rhythmic swings last and to spot cycle highs and lows, which can help time entries within a range or a trend's pullbacks.
Detrended Price Oscillator — visual
How Detrended Price Oscillator looks on a chart
The DPO plots price displaced against a shifted moving average, removing the trend to reveal cycles. Peaks and troughs mark cyclical highs and lows; the spacing between them estimates the cycle length.
Professional explanation
Detrending by displacement
The DPO's trick is the time shift. It takes an N-period simple moving average and displaces it back by (N/2 + 1) bars, then subtracts that shifted average from the price of the corresponding past bar. Because the moving average is centred on the past price rather than the current one, the long-term trend cancels out, leaving the deviation of price from its own recent centre — the cyclical component. Crucially, the DPO is shifted to the left and does not extend to the current bar, so it is not meant for real-time signalling of the latest price.
A cycle tool, not a momentum tool
This is the key to using the DPO correctly. It does not measure momentum or trend direction; it measures where price sits relative to its de-trended centre. Peaks in the DPO correspond to cyclical price highs and troughs to cyclical lows. By measuring the horizontal distance between successive DPO peaks (or troughs), a trader estimates the dominant cycle length — say, roughly 20 trading days — which can then inform the timing of entries and exits.
Choosing the period to match the cycle
The DPO's look-back should be set to roughly the length of the cycle you want to isolate. Too short a period captures only tiny wiggles; too long a period lets the trend leak back in. Many traders iterate: they estimate a cycle length, set the DPO period near it, and check whether the peaks and troughs line up with observed price swings, adjusting until the cycles are clean. The period is therefore not a fixed default but a tuning parameter.
Strengths, limits and the lookahead caveat
The DPO excels at revealing cyclicality that trend indicators hide, helping traders anticipate the timing of the next swing. Its limits are important: it assumes cycles are reasonably regular, which markets often are not; it is displaced and so does not signal the current bar; and it says nothing about direction or strength. Because of the time shift, some platforms plot it centred, which can look like it 'knows the future' — it does not; the displacement is a plotting convention, not a predictive one.
Formula
Detrended Price Oscillator formula
DPO = Price₍(N/2 + 1) bars ago₎ − SMAₙ displaced back by (N/2 + 1) bars
N is the look-back, chosen to match the cycle being isolated. The moving average is shifted back by (N/2 + 1) bars, and the DPO compares the past price to that shifted average, so it does not reach the current bar.
- Price (past) — The closing price (N/2 + 1) bars ago, the bar the shifted average is centred on
- SMAₙ — N-period simple moving average of price
- Displacement — The backward shift of (N/2 + 1) bars applied to the moving average
- N — Look-back period, tuned to the cycle length being isolated
How it is calculated
- Choose a look-back N roughly equal to the cycle length you want to isolate.
- Compute the N-period simple moving average of price.
- Displace that moving average back by (N/2 + 1) bars.
- Subtract the displaced moving average from the price of the bar it is centred on to get the DPO value.
- Plot the result and read the peaks and troughs as cyclical highs and lows, measuring their spacing to estimate the cycle length.
Interpretation & signals
Traders read the DPO for cycles, not trend: its peaks mark cyclical price highs and its troughs cyclical lows, and the spacing between successive peaks or troughs estimates the dominant cycle length, helping anticipate the timing of the next swing.
Buy / bullish signals
- The DPO troughs and turns up, marking a cyclical low within the estimated cycle.
- Price reaches the low point of its measured cycle as the DPO bottoms, timing a swing entry.
- A DPO trough aligns with support in a trend's pullback, timing a continuation buy.
- The DPO confirms the expected cycle-low timing derived from prior peak-to-peak spacing.
Sell / bearish signals
- The DPO peaks and turns down, marking a cyclical high within the estimated cycle.
- Price reaches the high point of its measured cycle as the DPO tops, timing a swing exit.
- A DPO peak aligns with resistance, timing a fade or profit-take.
- The DPO confirms the expected cycle-high timing derived from prior trough-to-trough spacing.
False signals to beware
- When cycles are irregular or absent, DPO peaks and troughs do not correspond to tradable turns.
- A poorly matched period lets the trend leak back in, muddying the cycle read.
- The DPO is displaced and does not signal the current bar, so it is unsuited to real-time triggers.
Settings, timeframe & conditions
Advantages & limitations
Advantages
- Isolates cycles that trend-following indicators completely obscure.
- Helps estimate the dominant cycle length for timing swings.
- Simple to compute and interpret once the cycle logic is understood.
- Removes trend bias, giving a cleaner view of short-term rhythm.
Limitations & disadvantages
- Assumes cycles are regular, which markets often are not.
- Displaced, so it does not signal the current bar or work in real time.
- Says nothing about trend direction or strength.
- Requires tuning the period to the cycle, which is not always obvious.
Combining Detrended Price Oscillator with other indicators
- Moving Average — A moving average defines the trend the DPO removes; using both lets you trade cycle lows in the direction the moving average confirms.
- Relative Strength Index — RSI adds momentum and overbought/oversold context to the DPO's cycle-timing, confirming that a cyclical low also shows momentum turning up.
- Bollinger Bands — Bollinger Bands frame volatility extremes while the DPO times the cycle within them, pairing a range edge with a cycle turn.
Practical examples (Nifty & Bank Nifty)
NIFTY example
A trader notices Nifty tends to swing in a rhythm of roughly 20 trading days between short-term lows. Setting the DPO look-back near 20 removes the trend and produces clean troughs spaced about 20 bars apart. When the next DPO trough is due and price is also near support, the trader uses the cycle timing to anticipate a swing low in Nifty and prepare an entry, rather than reacting after the turn.
BANKNIFTY example
Bank Nifty is in a broad uptrend that a momentum oscillator keeps calling overbought. The DPO, having stripped out that trend, instead reveals the timing of Bank Nifty's pullbacks — its troughs mark the cyclical lows within the uptrend. A trader uses those DPO troughs to time continuation entries on the dips, buying the cyclical low in the direction of the larger trend rather than fighting the overbought readings.
Common mistakes
- Treating the DPO as a momentum or trend indicator instead of a cycle tool.
- Expecting current-bar signals from a displaced, time-shifted oscillator.
- Using a period that does not match the market's actual cycle length.
- Assuming cycles are perfectly regular and trading them mechanically.
Professional usage
Professionals use the DPO for cycle analysis — estimating the dominant rhythm of a market so they can anticipate the timing of swing highs and lows rather than react to them. They tune the look-back to the observed cycle, measure peak-to-peak and trough-to-trough spacing, and combine the cycle timing with trend and momentum tools to trade cycle lows in the direction of the larger trend. They are careful about its displacement: the DPO is a study and planning tool, not a real-time trigger, and they discard it when a market shows no stable cycle.
Key takeaway
The Detrended Price Oscillator strips out the trend to expose the market's underlying cycles: its peaks are cyclical highs, its troughs cyclical lows, and their spacing estimates the cycle length. It is a cycle-timing and study tool, not a momentum or trend indicator — tune its period to the cycle, use it to anticipate swing timing, and remember it is displaced and does not signal the current bar.
Frequently asked questions
What is the Detrended Price Oscillator?
How is the DPO calculated?
What does the DPO tell you?
Is the DPO a momentum indicator?
What are the best DPO settings?
Why is the DPO displaced?
How do you use the DPO to find cycle length?
Is the DPO a leading or lagging indicator?
Can the DPO be used for Nifty and Bank Nifty?
What is the difference between the DPO and other oscillators?
Does the DPO show trend direction?
When does the DPO fail?
Voice search & related questions
Natural-language questions people ask about Detrended Price Oscillator.
What is the Detrended Price Oscillator in simple words?
Is the DPO a momentum indicator?
How do I find the cycle length with the DPO?
Why doesn't the DPO reach the current bar?
Can I use the DPO for Nifty?
Sources & references
Last reviewed 8 July 2026. Educational content only — not investment advice.