Indicators

DPO: How to Use the Detrended Price Oscillator

Most trend indicators are designed to track price in real time. The Detrended Price Oscillator, known by the acronym DPO, does the opposite on purpose: it removes the chart's long-term trend to expose only the short- and medium-term cycles that stay hidden behind it.

The problem the DPO tries to solve

When an asset is in a strong uptrend, it's common for it to form smaller peaks and valleys within that overall rise. Looking only at raw price, it's hard to visually separate these smaller cycles from the underlying move. The DPO tackles this problem by comparing the current price with a moving average shifted backward in time, removing much of the long-term trend component from the equation.

How the calculation works

The formula takes a simple moving average of a given number of periods — 20, for example — and shifts it backward by roughly half that period plus one. Then it subtracts this shifted average from each candle's closing price. The result is a line that oscillates above and below zero, highlighting peaks and valleys that represent short-term cycles, without the trend's overall slope getting in the way of the reading.

What the DPO line reveals

When the DPO is at positive values, the price is above the shifted average, indicating a moment of strength within the observed short-term cycle. When it's at negative values, the price is below that average, indicating weakness within the same cycle. The indicator's practical value lies in helping identify the approximate duration of these cycles — counting how many periods separate one DPO peak from another — which can guide, for example, the expected interval between one entry and another in a cycle-based strategy.

An example with numbers

Suppose an asset with a 20-period simple moving average shifted 11 periods back, currently at R$ 45.00. If the most recent candle's closing price is R$ 47.25, the DPO value at that point is 47.25 − 45.00 = 2.25, a positive value indicating the price is R$ 2.25 above the shifted reference average. If, a few weeks later, the same calculation results in -1.80, that shows the short-term cycle flipped from strength to weakness within that observed period — information that's much harder to notice looking only at raw price during a continuous uptrend.

Why the DPO isn't for reading trend

Precisely because its calculation removes the trend on purpose, the DPO shouldn't be used to decide whether an asset is rising or falling long-term — for that, traditional trend indicators remain more suitable. Another point of attention is the time shift: since the average used in the calculation is shifted backward, the DPO tends to be "delayed" relative to the most recent candle, which reinforces its role as a tool for identifying past cycles, not an early signal of the next move.

Combining the DPO with other tools

A common way to use it is combining the DPO with a longer-term trend indicator: the trend indicator sets the overall direction (up, down, or sideways), and the DPO helps identify, within that direction, the moments when the short-term cycle is favorable for an entry aligned with the main trend — for example, entering an uptrend only when the DPO comes out of negative values and starts rising, suggesting the start of a new strength cycle within the bigger trend.

Practical precautions

Like any tool based on shifted averages, the DPO works best on assets that historically show some reasonably regular cyclical pattern. In very erratic markets, with no identifiable cycle, the indicator can generate readings that flip signal very often, with no clear practical use.

To wrap up

The DPO is a niche tool, specifically useful for those who want to study short- and medium-term cycles hidden within a bigger trend, and shouldn't replace traditional trend indicators when deciding the market's overall direction. Testing it side by side with the price chart, watching the distance between peaks and valleys on assets you already follow, is the best way to understand whether it adds real value to your analysis.

Practice before you risk. Open your Astron account and test your ideas on the demo account with R$ 10,000 in virtual funds.

Create free account