The Detrended Price Oscillator (DPO) is a technical analysis indicator designed to identify short-term price cycles and fluctuations within a broader long-term trend. Unlike many momentum oscillators that focus on trend strength or overbought and oversold conditions, the DPO intentionally removes the longer-term trend component from price data in order to highlight shorter-term market movements.
The indicator calculates the difference between the current price and a Simple Moving Average (SMA) shifted back by (Period / 2) + 1 bars. By shifting the moving average backward, the DPO effectively centers price cycles around the zero line, making it easier to analyze price waves and historical market behavior.
The Detrended Price Oscillator is displayed in a separate indicator window and is fully compatible with both MetaTrader 4 (MT4) and MetaTrader 5 (MT5) platforms.
How the DPO Works
From a mathematical perspective, the DPO value represents the difference between the current Close price and the average Close price calculated over n bars, shifted back by (n / 2) + 1 bars.
- When the DPO is at zero, the current price equals the average price from that earlier period.
- When the DPO crosses below zero, it suggests that price has declined back into a previously traded range.
- When the DPO crosses above zero, it indicates that price has risen back into that earlier range.
Because of this structure, the DPO does not attempt to predict future prices directly. Instead, it provides insight into price positioning relative to historical averages, making it useful for cycle analysis and short-term trend confirmation.
Divergence Interpretation
One of the most valuable applications of the DPO is divergence analysis between the indicator and the price chart:
- Bearish divergence (trend weakening upward):
Price forms a higher high followed by another higher high, while the DPO forms a higher high followed by a lower high. This suggests that price is failing to move above the historical average with the same strength as before. - Bullish divergence (trend weakening downward):
Price forms a lower low followed by another lower low, while the DPO forms a lower low followed by a higher low. This indicates that downward momentum is weakening compared to the earlier period. - Potential downside reversal:
Price prints a higher high followed by a lower high, while the DPO continues printing higher highs. This implies that although price momentum is slowing, it is still exceeding earlier averages. - Potential upside reversal:
Price prints a lower low followed by a higher low, while the DPO continues printing lower lows, showing continued pressure relative to earlier averages.
These divergence patterns are not direct trading signals, but they provide valuable analytical clues that can be combined with other confirmation tools.
Alert System
The DPO indicator can issue alerts when the oscillator crosses the zero level. Supported alert types include:
- Native MetaTrader pop-up alerts
- Email alerts
- Mobile push notifications
Traders can choose whether alerts are triggered on the previously closed candle or the current forming candle.
Input Parameters
The indicator includes several configurable settings:
- MA_Period (default: 14) – Period of the Simple Moving Average used in calculations
- BarsToCount (default: 400) – Number of historical bars used for calculations
- EnableNativeAlerts – Enables MetaTrader pop-up alerts
- EnableEmailAlerts – Sends alerts via email (email settings required in MetaTrader)
- EnablePushAlerts – Sends alerts via mobile push notifications
- TriggerCandle (default: Previous) – Defines whether alerts are triggered on the previous closed candle or the current candle
Trading Strategy Considerations
Trend changes can be observed when the DPO crosses the zero line, but due to its lagging nature, anticipating these crosses often provides better analytical value than reacting after they occur.
The DPO is not intended as a standalone trading signal generator. Instead, it works best as a confirmation tool for short-term trend changes or as a divergence detector to anticipate potential market reversals when combined with price action or other indicators.
| Detrended Price Oscillator | MT4 |
| Detrended Price Oscillator | MT5 |
Password:forexsignalpro.net