Detrended Price Oscillator (DPO) Indicator for MT4/MT5
Info
The Detrended Price Oscillator (DPO) Indicator for MT4/MT5 is a Indicator for MetaTrader 5 that the detrended price oscillator (dpo) is a technical indicator designed to identify market overbought/oversold conditions and generate potential buy/sell signals. It isolates trends to focus on fundamental price movement cycles by transforming a moving average into a line, with price changes above and below this line indicating trends.
Usage
This tool is typically used for trend following strategies across multiple currency pairs.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Detrended Price Oscillator (DPO) Indicator for MT4/MT5
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
The Detrended Price Oscillator (DPO) is a technical indicator designed to identify market overbought/oversold conditions and generate potential buy/sell signals.
Typical Use Case
This Indicator excels in trend following on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: Quantora Candle Strength Analyzer MT5: Price Action and Wick Analysis - another powerful indicator for MetaTrader 5 traders.
The Detrended Price Oscillator (DPO) is a technical indicator designed to identify market overbought/oversold conditions and generate potential buy/sell signals. It isolates trends to focus on fundamental price movement cycles by transforming a moving average into a line, with price changes above and below this line indicating trends.Also recommended: price channel indicator - similar indicator with strong performance on MetaTrader 5.
The DPO is particularly useful for highlighting short-term cycles. Analyzing these short-term components within longer-term cycles can help pinpoint major reversal points. By disregarding long-term price cycles, the DPO makes short-term cycles more apparent.
Calculation:
where:
xma - smoothing algorithm;
price[] - current price of a financial asset;
smooth_period - final indicator smoothing period;
dpo_period - DPO smoothing period;
bar - bar index.
Working with Trading Signals:
A bullish signal is indicated when the DPO is above its zero line, signifying that the price is above its moving average. Conversely, a bearish signal occurs when the DPO is below the zero line, indicating the price is below its moving average.
Long-Term Cycles Reversal Points (Divergences):
If the chart forms a higher peak or a deeper trough, anticipate a price reversal upwards or downwards, respectively.
If a peak or trough is lower/higher than the preceding one, a price decline is expected.
There are two interpretations for buy/sell signals:
Buy Signals:
- When the DPO crosses the zero line upwards.
- When the DPO is in the oversold area, confirmed by previous lows, and the upper channel line is breached by both the DPO and the price, limiting a descending price movement.
Sell Signals:
- When the DPO crosses the zero line downwards.
- When the DPO is in the overbought area, confirmed by previous highs, and both the DPO and the price breach a support line of an ascending trend.
The DPO is seldom used in isolation for generating trading signals. It is most effective when used in conjunction with other indicators. However, it serves as a valuable tool for revealing cycles and optimizing the settings of other indicators.
Supported Smoothing Algorithms:
- Simple Moving Average;
- Exponential Moving Average;
- Smoothed Moving Average;
- Linear Weighted Moving Average;
- JMA Adaptive Average;
- Ultralinear Smoothing;
- Parabolic Smoothing;
- Tillson's Multiple Exponential Smoothing;
- Smoothing using Tushar Chande's algorithm;
- Smoothing using Perry Kaufman's algorithm.
It is important to note that the phase1 and phase2 parameters have distinct meanings across different smoothing algorithms. For JMA, it is an external phase variable ranging from -100 to +100. For T3, it is a smoothing ratio multiplied by 100 for enhanced visualization. For Vidya, it represents the CMO oscillator period, and for AMA, it is the slow EMA period. In other algorithms, these parameters do not influence smoothing. For AMA, the fast EMA period is a fixed value of 2. The exponentiation ratio is also fixed at 2 for AMA.
This indicator utilizes classes from the smoothalgorithms.mqh library, which must be copied to the terminal_data_folder\mql5\include. The usage of these classes is detailed in the accompanying article.
You may also like: kinematic price physics: velocity and acceleration indicators - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property version "1.00"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_plots 1
#property indicator_type1 draw_color_histogram
#property indicator_color1 gray,dodgerblue,blue,magenta,mediumorchid
#property indicator_style1 style_solid
#property indicator_width1 3
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.