OscillatorsNon-directional cycle oscillatorDPO

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.

164.5-104.3DPOTime (illustrative bars →)
Category
Oscillators
Type
Non-directional cycle oscillator
Created by
Classical technical analysis
Best timeframe
Any; the period is matched to the cycle, not the timeframe

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

  1. Choose a look-back N roughly equal to the cycle length you want to isolate.
  2. Compute the N-period simple moving average of price.
  3. Displace that moving average back by (N/2 + 1) bars.
  4. Subtract the displaced moving average from the price of the bar it is centred on to get the DPO value.
  5. 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

Best settings
Look-back tuned to the observed cycle length (commonly 20–21 for a monthly-ish cycle)
Avoid
Using the DPO as a momentum or trend indicator, or expecting current-bar signals
Works best in
Markets with reasonably regular, repeating cycles
Struggles in
Trending or erratic markets with no stable cycle

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?
The Detrended Price Oscillator removes the trend from price by comparing a past price to a displaced moving average, isolating the short-term cycles that trend-following indicators obscure. It is a cycle-analysis tool rather than a momentum or trend indicator.
How is the DPO calculated?
You compute an N-period simple moving average, displace it back by (N/2 + 1) bars, and subtract it from the price of the bar it is centred on. Because the average is centred on a past price, the trend cancels out, leaving the cyclical component.
What does the DPO tell you?
It reveals the market's cycles by removing the trend. Its peaks correspond to cyclical price highs and its troughs to cyclical lows, and the spacing between successive peaks or troughs estimates the dominant cycle length, helping time swings.
Is the DPO a momentum indicator?
No. Unlike most oscillators, the DPO does not measure momentum or trend direction. It is a cycle tool that shows where price sits relative to its de-trended centre, used to identify and time cyclical highs and lows.
What are the best DPO settings?
There is no fixed default — the look-back should be tuned to roughly the length of the cycle you want to isolate. A common choice is around 20–21 for a monthly-scale cycle, but the period is a tuning parameter matched to the market's observed rhythm.
Why is the DPO displaced?
The DPO shifts its moving average back by (N/2 + 1) bars so that the average is centred on the past price, which is what cancels the trend. As a result the DPO does not extend to the current bar and is not designed for real-time signals on the latest price.
How do you use the DPO to find cycle length?
You measure the horizontal distance between successive DPO peaks, or between successive troughs. That spacing, in bars, estimates the dominant cycle length, which you can then use to anticipate when the next cyclical high or low is due.
Is the DPO a leading or lagging indicator?
It is neither in the usual sense. Because it is displaced and de-trended, it is a study tool that helps anticipate the timing of cycles rather than a real-time leading or lagging signal on the current bar.
Can the DPO be used for Nifty and Bank Nifty?
Yes. On Nifty and Bank Nifty the DPO can reveal the timing of short-term swing highs and lows within a trend, helping time pullback entries, provided the market shows a reasonably stable cycle for the chosen look-back.
What is the difference between the DPO and other oscillators?
Most oscillators, like RSI or MACD, measure momentum or trend and signal on the current bar. The DPO instead removes the trend to isolate cycles and is displaced, so it is used for cycle timing and study rather than for direct momentum signals.
Does the DPO show trend direction?
No. The DPO deliberately removes the trend, so it says nothing about whether the market is going up or down. To trade with the trend, you pair the DPO's cycle timing with a separate trend indicator like a moving average.
When does the DPO fail?
The DPO fails when a market has no stable cycle — in strongly trending or erratic conditions its peaks and troughs do not correspond to tradable turns. It also fails if the period is mismatched to the actual cycle, letting the trend leak back in.

Voice search & related questions

Natural-language questions people ask about Detrended Price Oscillator.

What is the Detrended Price Oscillator in simple words?
It removes the overall trend from price to show the market's up-and-down cycles more clearly. Its peaks are cycle highs and its troughs are cycle lows, which helps you time the swings.
Is the DPO a momentum indicator?
No. Unlike RSI or MACD, the DPO is not about momentum or direction. It is a cycle tool that strips out the trend to reveal how long the market's rhythmic swings tend to last.
How do I find the cycle length with the DPO?
Measure the distance in bars between one DPO peak and the next, or one trough and the next. That spacing tells you roughly how long the market's cycle is, so you can anticipate the next turn.
Why doesn't the DPO reach the current bar?
Because it shifts its moving average back in time to cancel out the trend, the DPO stops short of the latest bar. That is why it is used for studying cycles rather than for real-time signals.
Can I use the DPO for Nifty?
Yes. You tune its look-back to Nifty's swing rhythm, and its troughs help you time cyclical lows for entries, especially for buying pullbacks in the direction of the larger trend.

Sources & references

Last reviewed 8 July 2026. Educational content only — not investment advice.

Educational content only — not investment advice. Indicator diagrams are illustrative, computed from a fixed synthetic price series. Trading involves substantial risk. See our Risk Disclosure and SEBI Disclaimer.