What is the Detrended Price Oscillator (DPO)?

The detrended price oscillator (DPO) is an indicator in technical analysis that attempts to eliminate the long-term trends in prices by using a displaced moving average, so it does not react to the most current price action. This allows the indicator to show intermediate overbought and oversold levels effectively.

Detrended Price Oscillator Indicator

A detrended price oscillator is an oscillator indicator. It analyses price trends to estimate the length of price cycles. It estimates these lengths from peak to peak or trough to trough. Unlike many other oscillators, the DPO is not a momentum indicator.

How to calculate the Detrended Price Oscillator (DPO)


Detrended price oscillator (DPO) can be calulated as follows

  • movav = SimpleMovingAverage(close, period)
  • dpo = close – movav(shifted period / 2 + 1)

Why Use The Detrended Price Oscillator (DPO)

The DPO helps traders identify the price cycle of a financial asset by weighing up an SMA to an older price which is nearly in the middle of the look-back period. It eliminates the long-term price trends using displaced moving average so that the indicator doesn’t react to the most recent price actions.

How to Use The Detrended Price Oscillator?

  • Bullish Scenario:- DPO moves similarly to the price. Being an oscillator, it moves above and below 0 based on the price fluctuation. So if the price is going up, DPO will move up. Thus if the DOP is greater than 0 and is going up, then we can consider it to be a bullish scenario.
  • Bearish Scenario:- Similarly, if the value of DPO moves below 0, we can consider it a Bearish Scenario.

Building Detrended Price Oscillator Strategy on Mudrex


Since the bullish scenario is considered when the DPO is moving up and is greater than 0, we will sell when we believe that the bullish scenario is ending and vice-versa.

  • BUY:-  DPO(50 days) >0 and DPO(20 Days) crossesup (-50)
  • SELL:-DPO(50 days) <0 and DPO(20 Days) crossesdown (50)
  • Time Frame:- 6Hrs

Creating on Mudrex:-

We will need 4 indicator block in total, 2 for buying and 2 for selling. We will use And gate to use them together.

For buying, we will use the following setting:-

For selling, we will use the following setting:-

Final Strategy:-


Running on Binance Futures: BTC/USDT with tick interval of 6H yielded an overall profit of 224.7%