What it does
The Detrended Price Oscillator (DPO) removes the longer trend from price to isolate shorter cycles. It subtracts a simple moving average from price, but the SMA is shifted back by (period / 2) + 1 bars, so the comparison is between price and a displaced average rather than the current one. The result oscillates around zero and highlights the length and amplitude of price cycles without being dominated by trend.
How to add it
Click Indicators (ƒx) in the header.
Search “Detrended Price Oscillator” and click the result.
Hover its legend row and click the gear to open settings.
How traders use it
- Estimate cycle length: measure the distance between successive DPO peaks (or troughs) to find the instrument's dominant short-term cycle.
- Time entries within a trend: in an uptrend, DPO dipping below zero and turning up marks cyclical pullback lows worth buying.
- Compare amplitude: shrinking DPO swings show cycles compressing, often before a volatility expansion.
- Use it for analysis and timing alongside a separate trend tool, not as a directional system by itself.
Inputs
| Input | Type | Default | Range / Options |
|---|---|---|---|
| Length | number | 21 | 1–200 |
| Centered | boolean | Off | — |
Plots & styling
| Plot | Style | Default color |
|---|---|---|
| DPO(21) | line | #43A047 |
Every plot's color, line width and visibility can be changed on the Style tab. Precision (default 2 decimals), price-scale labels and status-line values are configurable at the bottom of the Style tab.
Reference levels
| Level | Value |
|---|---|
| Zero Line | 0 |
Level values, colors and line styles are editable in settings.
Tips
- Use Add to favorites in the legend menu; starred studies surface at the top of the picker.
- Reference levels (where the study has them) are editable — tune them to the instrument you're trading.
- Hide the study from the legend eye instead of removing it when you only want it out of the way temporarily.
Watch out for
- Because of the backward displacement, the DPO is not aligned with the current bar and says nothing about the present trend; it is a study of past cycles.
- Cycle lengths drift over time, so patterns identified from DPO peaks may not persist.