Skip to content

Detrended Price Oscillator (DPO)

Detrended Price Oscillator — identifies cycles by comparing price with a lagged SMA. Detrended Price Oscillator (DPO) compares price with its historical moving-average value, shifted back by half the period plus one bar. Unlike MACD and RSI, DPO is not a leading indicator and is not intended for real-time use — it helps identify past price cycles.

Formula:

Shift = period / 2 + 1
DPO = Close - SMA(Close, period)[shifted back by 'Shift' bars]
ParameterTypeDefaultRange / Values
Periodint201-200
TriggerDirectionConditionDescription
Level cross up🟢 BuyThe indicator value crossed the specified level from below to above.The DPO line crosses the configurable level Level from below to above. Level is set in the trigger parameters.
Level cross down🔴 SellThe indicator value crossed the specified level from above to below.The DPO line crosses the Level from above to below. Level is set in the trigger parameters.
Value above level by N🟢 BuyThe indicator value rose above the level by the specified distance.The DPO line crosses the Level + Distance mark, moving up. The distance delays entry until a confirmed breakout of the level.
Value below level by N🔴 SellThe indicator value dropped below the level by the specified distance.The DPO line crosses the LevelDistance mark, moving down.
Value rising🟢 BuyThe indicator value is rising relative to the previous bar.The DPO line is higher on the current bar than on the previous one — upward momentum.
Value falling🔴 SellThe indicator value is falling relative to the previous bar.The DPO line is lower on the current bar than on the previous one — downward momentum. Fires on every declining bar.
Slope turns positive🟢 BuyThe indicator slope turned positive — an upward reversal.The DPO line changes its slope from descending to ascending — the indicator stopped falling and started rising.
Slope turns negative🔴 SellThe indicator slope turned negative — a downward reversal.The DPO line changes its slope from ascending to descending — the indicator stopped rising and started falling.
Zero cross up🟢 BuyThe indicator line crossed zero from below to above — a buy signal.The DPO line crosses the zero level from below to above.
Zero cross down🔴 SellThe indicator line crossed zero from above to below — a sell signal.The DPO line crosses the zero level from above to below.
ParameterTypeDefaultRange / Values
Level (Value above level by N, Value below level by N, Level cross up, Level cross down)float0
Distance (Value above level by N, Value below level by N)float00>