INDICATORS · DETRENDED PRICE OSCILLATOR

Detrended Price Oscillator in Crypto: Why the Value Changes Before Candle Close

The Detrended Price Oscillator compares price with a moving average from the past. Many versions also shift the plot, so the live value appears at an earlier bar.

Short answer

DPO = close − SMA(N) taken from N/2 + 1 bars earlier (one common definition). Some implementations plot it displaced back in time to centre the average, which means the most recent plotted values are filled in later — a form of repainting. On the live bar, the close term moves with price. Check which version your tool uses: undisplaced DPO is usable for signals on closed bars; displaced DPO is for cycle analysis, not real-time triggers.

Which part of DPO uses the live bar

ComponentUses current bar?Effect intrabar
CloseYesMoves with price
Shifted SMANo (past bars)Fixed
Displaced plotDependsRecent values filled later

A displaced DPO looks very smooth in history because each point was drawn with knowledge of later bars.

Review Detrended Price Oscillator in Crypto with bar replay before using it live.

Open ChartsPod replay

How much it moves inside one bar

DPO during one bar (illustrative)DPO during one bar (illustrative): OPEN: DPO +120; MID: −40; LATE: +60; CLOSE: +35 (undisplaced).OPENDPO +120MID−40LATE+60CLOSE+35 (undisplaced)
Only DPO's closing value is kept in history. Original ChartsPod editorial graphic.
Illustrative intrabar range of DPO vs its closed valueIllustrative intrabar range of DPO vs its closed value: Live DPO range 160 ; Typical closed change 50 .ILLUSTRATIVE INTRABAR RANGE OF DPO VS ITS CLOSED VALUELive DPO range160Typical closed change50
How far DPO travels inside a bar versus between bars. Original ChartsPod editorial graphic.

Rules

DPO signal hygieneDPO signal hygiene: Signals on closed bars; Bar-close alerts; Backtest uses the same rule; Live value labelled provisional; Settings identical across chart and alerts.DPO SIGNAL HYGIENESignals on closed barsBar-close alertsBacktest uses the same ruleLive value labelled provisionalSettings identical across chart and alerts
Closed values are what history shows. Original ChartsPod editorial graphic.

Confirm displacement settings before using DPO in alerts.

Put Detrended Price Oscillator in Crypto next to price, flow and positioning in one workspace.

Open a ChartsPod workspace

Questions readers ask

What is the DPO?

Price minus a past moving average.

Does DPO repaint?

Displaced versions fill recent values later.

Which version for signals?

Undisplaced, closed bars.

Sources and methodology

Indicator formulas are standard definitions; live-versus-closed behaviour follows TradingView's repainting documentation. Values in examples are illustrative.

  1. TradingView Pine Script: Repainting — live vs historical calculation.
  2. ChartsPod indicator reference — indicator calculations.

This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.

CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.