Detrended Price Oscillator (MetaTrader indicator) — a version of the price oscillator based on the difference between the current price and the simple moving average shifted by (Period / 2) + 1 bars. Unlike the stochastic oscillator, this indicator aims to show the short-term trend changes (price waves inside the long-term trend). The indicator is displayed in the separate window of the chart. You can use this Detrended Price Oscillator (DPO) indicator in both MT4 and MT5 versions of the platform.
The formula to calculate the detrended price oscillator at the bar i is the following:
where:
The present implementation of the DPO can also issue alerts on a cross of the zero level. It supports native alerts, email alerts, and push-notifications.
From the mathematical point of view, the current DPO value is the difference between the current Close value and the average of the Close values over n bars ½n + 1 bars ago. Therefore, when the DPO is at the zero level, it means that the current Close value is the same as the average of the Close values over n bars ½n + 1 bars ago. This implies that the price returned to some previously visited range. If the zero line is crossed by the DPO from above, it means that the price declined to reach that range, whereas if zero line is crossed by the DPO from below, it means that the price rose to reach the earlier range.
Considering the above, the divergence between the DPO and the price chart can be interpreted as following:
Evidently, these notions alone do not constitute any particular trading signals, but they provide testable patterns for analysis or use with confirmation signals.
Trend changes are signaled by the cross of the indicator and the zero level. However, because the indicator is lagging, predicting such crosses can be a better technique. It is not quite a very accurate indicator for direct trading purposes, but it still can be used for short-term trend confirmation.
Another possibility with the Detrended Price Oscillator is to use detect divergences with the price chart. As you can see on the chart below, the major trend reversal could be spotted by comparing the double top demonstrated by the price and the lower high on the DPO chart.
Detrended Price Oscillator for MetaTrader 4 in .zip
Detrended Price Oscillator for MetaTrader 4 in .mq4
Detrended Price Oscillator for MetaTrader 5 in .zip
Detrended Price Oscillator for MetaTrader 5 in .mq5
Warning! If you do not know how to install this indicator, please read the MetaTrader Indicators Tutorial.
Do you have any suggestions or questions regarding this indicator? You can always discuss Detrended Price Oscillator with the other traders and MQL programmers on the indicators forums.