Detrended Price Oscillator (DPO)

Parameters: period = 20 (10–50)

Overview

The Detrended Price Oscillator (DPO), developed by William Blau in 1991, is a unique technical indicator that removes trend from price to isolate underlying market cycles. Unlike traditional momentum oscillators that compare current price to past price, DPO compares current price to a displaced moving average, effectively filtering out the dominant trend to reveal hidden cyclical patterns that drive market timing decisions.

What sets DPO apart in 2025's trading environment is its focus on market rhythm rather than momentum. By centering the moving average calculation and displacing it backwards, DPO creates a zero-centered oscillator that clearly identifies when prices are at cyclical highs or lows. This makes it particularly valuable for traders seeking to time entries and exits based on recurring market patterns, especially in ranging markets where cycles dominate over directional trends.

Interpretation & Trading Signals

Cycle Identification:

  • Peak Values: Cycle high reached - prepare for downward reversal
  • Trough Values: Cycle low reached - anticipate upward reversal
  • Zero Line: Cycle midpoint - momentum continuation expected
  • Extreme Readings: Overextended cycle - reversal imminent

Trading Strategies (2025):

  • Cycle Length Estimation: Measure peak-to-peak or trough-to-trough for timing
  • Zero Line Crossovers: Buy when crossing above, sell when crossing below
  • Divergence Trading: Price/DPO divergences signal potential reversals
  • Range Trading: Buy at cycle lows, sell at cycle highs in sideways markets

Best Practices 2025:

  • Period Selection: 20-day default works well, adjust for asset's natural cycle
  • Market Conditions: Most effective in ranging or cyclical markets, avoid strong trends
  • Confirmation: Combine with RSI or Stochastic for cycle extremes validation
  • Risk Management: Place stops beyond recent cycle extremes for protection

Example Usage

Code examples will be available once the Rust implementation is complete.

Performance Analysis

Related Indicators