Detrended Price Oscillator indicator for Metatrader

Indicator Parameters and Configuration of Detrended Price Oscillator of MT4

  • MA_Period (normal value = 14): The period of the simple moving average displayed by the indicator in a separate window below the graph.
  • BarsToCount (normal value = 400): It indicates how many bars or candles are used to calculate the indicator.
Detrended Price indicator for Metatrader 4
EUR/USD daily chart with the Detrended Price indicator for Metatrader 4


This is a custom indicator for Metatrader based on the Detrended Price Oscillator which is a development or version of the price oscillator. Basically, this oscillator is based on the difference between the current price and the simple moving average displaced by a number of bars equal to 1 + (period / 2). Unlike the stochastic oscillator, this indicator is intended to show the changes in short-term trends, ie waves or price movements within the long-term trends. As can be seen in the picture above, the indicator is displayed in a separate window like other oscillators.

The most significant trend changes are shown by crosses of the indicator (blue line) with zero levels. However, because this is an indicator that experiments with a delay with respect to price, sometimes it may be best to predict or anticipate the crossings into the market at the right time. While not a particularly appropriate tool to open and close positions, it can be useful for confirmation of short-term trends.

You can download this indicator for Metatrader 4 and 5 using the following link:

Leave a Comment