You called the top, sold, and watched price grind higher for another two weeks before it finally rolled over. The reversal you saw was real. Your timing was just early, because a rising trend and a cycle peak look almost identical while they are happening.
Trend and cycle are two different clocks running at once, and price is the sum of both. The detrended price oscillator pulls them apart. By the end of this guide you will be able to read the cycle underneath a trend and understand why the DPO’s odd, shifted plot is a feature rather than a bug.
Key Findings
- It removes trend to show cycle: the DPO subtracts a moving average from a past price, leaving the shorter swing that the trend normally hides.
- It measures rhythm, not entries: the distance between DPO peaks estimates a cycle length, so you can anticipate the next turn instead of reacting to it.
- The plot is shifted back on purpose: the line stops before the last few bars because it is displaced to center the cycle, not because it is hiding a signal.
- Shifted is not repainting: once a bar closes its DPO value is fixed, so a past peak stays on the same bar after a reload.
What does the detrended price oscillator actually do?
The detrended price oscillator takes a price from the middle of a lookback window and subtracts a moving average of the same length, which strips out the trend and leaves the cycle underneath. When that past price sat above its average, the line prints above zero. When it sat below, the line prints below zero. The trend is gone; what is left is the shorter rhythm.
That is the whole point, and it is also why the DPO frustrates traders who expect a normal oscillator. It is not reading this second’s price. It is a study of the recent past, laid out so the repeating pattern in it becomes obvious.
The idea of isolating a repeating cycle from a longer trend is not new. It runs back to J.M. Hurst’s 1970 book The Profit Magic of Stock Transaction Timing, which argued that price is a stack of overlapping cycles of different lengths. For the exact mechanics and the standard settings, StockCharts ChartSchool’s detrended price oscillator entry lays out the calculation plainly.
Why does the DPO line stop before the last few bars?
Here is the first thing that throws people. The DPO is shifted backward in time by about half its lookback period plus one bar, so the line simply ends before the most recent candles. That empty gap on the right is not a glitch and not the tool withholding a signal.
The shift is doing a job. A plain moving average always lags price, sitting a few bars behind the move. By comparing an older price to the average and displacing the result, the DPO cancels most of that lag and centers each swing over the price that caused it. The trade-off is the blank space on the right, because the calculation cannot reach bars that fall inside the displacement window.
This is why the DPO belongs in the study-and-timing family, not the live-signal family covered in leading vs lagging indicators . It tells you the cycle’s shape and length. It does not hand you a fresh cross on the current bar, and it was never meant to.
How do you read a cycle with the DPO?
Start with distance, not direction. Measure the number of bars from one DPO peak to the next, and from one trough to the next. If those gaps stay roughly even, you have found an approximate cycle length, and the next low is due about that many bars after the last one.
Now the honest limit. A cycle length is an estimate, not a schedule the market has agreed to keep. Cycles stretch, shrink, and sometimes vanish for long stretches when a strong trend takes over. The DPO tells you a turn is due, which is a very different claim from a turn happening. Treat the timing as a heads-up that raises your attention, then wait for price structure or a momentum tool to confirm the actual reversal.
RelicusRoad Pro
Have you been trading for a while but have never made consistent profits or are you new to FOREX trading and want to get a head start? Try RelicusRoad and you'll never look back.
Get RelicusRoad ProDPO vs MACD vs momentum: which question are you asking?
The DPO is easy to lump in with other oscillators, but it answers a different question. Seeing them side by side keeps you from expecting the wrong thing.
| Factor | Detrended price oscillator | MACD | Momentum |
|---|---|---|---|
| What it isolates | The cycle, trend removed | Trend and momentum together | Raw directional thrust |
| Reads the current bar | No, plot is shifted back | Yes | Yes |
| Main use | Estimating cycle length and timing | Trend shifts and crossovers | Speed of the move |
| Best at | Anticipating when a turn is due | Confirming a trend has changed | Gauging how hard price is pushing |
| Weak spot | Useless when no cycle exists | Lags in fast reversals | Whipsaws in chop |
The DPO’s blind spot is the current bar, which is exactly where the MACD histogram does its best work. That pairing is common for a reason: one tells you a low is due, the other helps confirm momentum has actually turned. If you want a bounded reversal read to sit alongside them, the RSI settings guide covers where that fits. None of the three replaces the others.
Does the detrended price oscillator repaint?
A correctly built DPO does not repaint, and its shifted plot gets blamed for repainting when it is doing nothing of the kind. Repainting means a past value changes after the fact, so a signal that looked solid yesterday sits on a different bar today.
The DPO does something entirely different: a fixed backward displacement. Once a bar has closed, its DPO value is locked and does not move on a reload. The blank space on the right is the plot stopping short of the newest bars, not an old value quietly relocating. Those two things feel similar on screen and are opposites underneath.
| What you check | Clean DPO | A truly repainting build |
|---|---|---|
| Old peaks and troughs | Stay fixed on their bar | Shift to a new bar after a reload |
| Right edge of the plot | Blank by design, always | Fills in, then rewrites itself |
| Back-test vs live | Match, allowing for the shift | Look perfect, then fail forward |
The check is the same one from the non-repaint forex indicator guide : mark a past DPO peak, reload the chart, and confirm the mark has not jumped. If it holds, the tool is honest and you can study its history with confidence.
Where does RelicusRoad Pro fit for cycle timing?
RelicusRoad Pro treats timing as one input among several rather than a signal on its own. A cycle estimate can tell you a low is due, but it cannot tell you the low has arrived, and stacking a cycle tool onto three more oscillators usually just gives you four opinions that argue with each other. RelicusRoad Pro reads structure and momentum together and settles each signal at the bar’s close, fixed there, so what you tested is what you trade.
Cycle timing sharpens patience; it does not replace it. Knowing a turn is roughly due keeps you from selling a strong trend too early, but it still asks you to wait for confirmation before you act. If you are assembling a full toolkit rather than hunting for one perfect line, the best trading indicators guide shows how a timing read, a trend filter, and a structure map split the work.
Frequently asked questions
What is the detrended price oscillator? The detrended price oscillator, or DPO, is a cycle indicator. It takes a past price and subtracts a moving average of the same length, which strips out the broad trend and leaves the shorter up-and-down cycle that sits inside it. The result is drawn as a line that swings above and below a zero line. Above zero means price at that point was above its own moving average; below zero means it was under it. Unlike most oscillators, the DPO is not built to read the current bar. It is built to show the rhythm of the recent past so you can estimate where the next peak or trough is due.
How do you use the DPO indicator? Use it to measure the length of a price cycle rather than to fire entries. Look at the distance in bars from one DPO peak to the next, and from one trough to the next. If those turns arrive at a fairly regular spacing, you have a rough cycle length, and you can watch for the next low or high to land near that same spacing. Traders then pair that timing estimate with a separate signal, such as a support level or a momentum read, to decide whether to act. On its own the DPO tells you when a turn is due, not that it has happened.
What are good detrended price oscillator settings? The one setting that matters is the lookback period, and it should roughly match the cycle you are trying to see. A common starting point is between 20 and 30 bars, but there is no universal number, and anyone selling you a magic figure is guessing. A shorter period isolates faster, tighter cycles and reacts sooner; a longer period smooths those out and surfaces the slower swings. The practical method is to eyeball the chart, estimate the average distance between recent highs, and set the period near half of that. Then adjust until the peaks and troughs line up with the turns you can actually see.
Why does the DPO line stop before the most recent bars? Because the indicator is displaced backward on purpose. The DPO compares a price from the middle of its lookback window to the moving average, which means the line is shifted to the left by roughly half the period plus one bar. That shift is what removes the lag from the moving average and centers the cycle, but it also means the calculation cannot reach the last few bars. The empty space on the right is not a fault and not the tool hiding a signal. It is the cost of centering the cycle, and it is exactly why the DPO is a timing and study tool rather than a live entry trigger.
Does the detrended price oscillator repaint? A correctly built DPO does not repaint, and its shifted plot is often mistaken for repainting when it is not. Repainting means a past value changes after the fact, so a signal that looked real yesterday sits on a different bar today. The DPO instead uses a fixed backward displacement: once a bar has closed, its DPO value is set and does not move on a reload. What confuses people is the blank space on the right, but that is the plot stopping short, not an old value shifting. Mark a past DPO peak, reload the chart, and confirm the peak is still on the same bar. If it moves, the build is faulty; the standard calculation does not.
The detrended price oscillator will not tell you to buy. It tells you when a turn is due, and that alone can stop you from fighting a trend that still has one more cycle left in it.
See how RelicusRoad Pro turns a timing read into a signal you can test →