XXDPO - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources - MetaTrader 5 Resources


The Detrended Price Oscillator (DPO) is a technical indicator that shows the overbought/oversold status of the market and can also be used to obtain buy/sell signals.
It teases out trends and focuses on underlying price movement cycles. To achieve this, the moving average transforms into a line, and the price changes below and above it become a trend oscillator.
This indicator is used to highlight short-term cycles, as analysis of the short-term components of long-term cycles helps identify major reversal points in long-term cycles. DPO's failure to consider long-term price cycles makes short-term cycles more pronounced.
This DPO version is calculated as follows:
If the DPO is above its zero line (i.e. the price is above its moving average), it is a bullish signal. If the DPO is below the zero line (i.e. the price is below its moving average), then this is a bearish signal.
Long term cycle reversal points (divergence):
There are two interpretations of buy/sell signals.
We should buy during the following times:
We should sell when:
The indicator allows choosing the smoothing and averaging algorithm from ten possible versions:
It should be noted that the Phase1 and Phase2 parameters have completely different meanings for different smoothing algorithms. For JMA, it is an external phase variable that varies from -100 to +100. For T3, it is the smoothed ratio multiplied by 100 for better visualization; for VIDYA, it is the CMO oscillation period; for AMA, it is the slow EMA period. In other algorithms, these parameters do not affect smoothing. For AMA the fast EMA period is a fixed value, equal to 2 by default. For AMA, the ratio of raised powers is also equal to 2.
The indicator uses the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

Attachment download
📎 colorxxdpo.mq5 (9.11 KB)
📎xxdpo.mq5 (8.05 KB)
📎 smoothalgorithms.mqh (133.8 KB)
Source: MQL5 #571
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •