📊 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.
120KUses
7400Likes
0Comments
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
| Parameter | Default | Description |
|---|---|---|
| Period | 20 | Lookback for the SMA and shift offset |
| Source | Close | Price 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.
