Detrended Price Oscillator (DPO)
period
= 20 (10–50) Overview
The Detrended Price Oscillator (DPO) was developed by William Blau in 1991 as a specialized tool designed to remove trend from price data and make it easier to identify market cycles. Unlike momentum oscillators such as the stochastic or MACD, the DPO specifically focuses on highlighting peaks and troughs in price patterns by comparing current prices to a displaced moving average. This unique approach strips away longer-term trends, leaving only shorter-term cycles visible for analysis.
The DPO calculation subtracts a simple moving average that has been shifted back in time from the current price: DPO = Price {X/2 + 1} periods ago - X-period SMA. For example, a 20-day DPO uses a 20-day SMA displaced by 11 periods {20/2 + 1 = 11}. This displacement means the indicator doesn't extend to the most recent price bar, making it a historical rather than real-time indicator. The DPO oscillates above and below zero as prices move above and below the displaced moving average, revealing the market's cyclical rhythm independent of its overall trend direction.
Interpretation & Trading Signals
Cycle Identification:
- Peak-to-Peak Measurement: Count periods between peaks to estimate cycle length
- Trough-to-Trough Timing: If troughs occur every 2 months, expect next one accordingly
- Cycle Bottoms: In uptrends, DPO troughs present buying opportunities
- Cycle Peaks: In uptrends, DPO peaks suggest selling opportunities
Trading Applications:
- Zero Line Crosses: Above zero = bullish (price above cycle average), below = bearish
- Divergences: Price new low + DPO higher low = bullish divergence
- Cycle Timing: Use historical cycle lengths to anticipate future turning points
- Not Standalone: Combine with trend indicators for complete analysis
Important Limitations:
- Not Real-Time: Indicator lags by X/2 + 1 periods due to displacement
- Not for Trends: By definition, removes trend information entirely
- Supplementary Tool: Should not be used alone for trading decisions
- Best With: Combine with trend lines, support/resistance, momentum oscillators
Example Usage
Code examples will be available once the Rust implementation is complete.
Performance Analysis
Related Indicators
Average Directional Index
Technical analysis indicator
Average Directional Movement Index Rating
Technical analysis indicator
Alligator
Technical analysis indicator
Aroon
Technical analysis indicator
Aroon Oscillator
Technical analysis indicator
Directional Indicator (+DI/-DI)
Technical analysis indicator