Technical Analysis  Technical Indicators  Oscillators  Detrended Price Oscillator

Analyze with the

Detrended Price Oscillator

Detrended Price Oscillator eliminates the trend effect of price movement. This simplifies the process of finding out cycles and levels of outbidding/resale.

Long-term cycles consist of several shorter cycles. Analyzing such short components helps to define crucial moments of the cycle's development. DPO gives a chance to eliminate the influence on prices of long-term cycles.

To calculate DPO you should take a certain period. Remove cycles that are longer than the chosen period from price dynamics, and leave shorter cycles. Half of the cycle's length is used for smoothing. We recommend using a period of 21 or less.

The bounds (overbought/oversold levels) come from the history of previous behavior of prices. It is recommended to stand in a long position if DPO first falls below the resale level and then gets above it. Crossing of the zero point from above followed by a rise above that level is also a signal for opening a long position. Everything is vice versa for short positions.


DPO = CLOSE - SMA (CLOSE, (N / 2 + 1))

SMA — a simple moving average;
CLOSE — the closing price;
N — the period of the cycle (if N is equal to 12, DPO resembles the DiNapoli Detrend Oscillator).

Source Code

Full MQL4 source of Detrended Price Oscillator is available in the Code Base: Detrended Price Oscillator

Warning: All rights on these materials are reserved by MetaQuotes Software Corp. Copying or reprinting of these materials in whole or in part is prohibited.