NEWAI Portfolio Risk Engine is live for stress testing and hedge planningExplore engine →
📊 TECHNICAL

Detrended Price Oscillator

An oscillator that strips the trend out of price to expose underlying cycles and overbought/oversold swings, deliberately plotted with a backward shift.

T
Technical analysis community
Strategy Author
Updated 15 Jul 2026
120KUses
7400Likes
0Comments
📊 Open on Chart
Live Demo — Detrended Price Oscillator applied to NIFTY 50 (illustrative)
PriceEMA(9)EMA(21)SMA(20)

What is the Detrended Price Oscillator?

DPO removes the influence of the longer-term trend from price so cyclical peaks and troughs become easier to see. It compares a past closing price to a simple moving average, and is intentionally plotted shifted back in time to align with the SMA period it was measured against.

Formula

Shift = floor(Period/2) + 1
DPO = Close[Shift bars ago] - SMA(Close, Period)

The result is plotted Shift bars back from the current bar.

Parameters

ParameterDefaultDescription
Period20Lookback for the SMA and shift offset
SourceClosePrice field used

Signal Interpretation

  • DPO above zero means price was trading above its moving average at that point in the cycle.
  • Peaks/troughs in DPO estimate the length of the market's dominant cycle.
  • Because trend is removed, DPO extremes are cleaner than a raw price-vs-MA comparison.
  • Evenly spaced DPO peaks/troughs suggest a stable cyclical rhythm.
  • DPO does not catch the current move in real-time due to its backward shift.

Tips & Best Practices

  • Never use DPO as a real-time entry trigger because of its intentional plotting lag.
  • Use it to estimate cycle length, then apply that to other timing tools for actual entries.
  • Works best on markets with reasonably regular cyclical behavior.