Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Detrend_Price_Oscillator - MetaTrader 5 Script - MT4/MT5 Resource

author EAcpu | 4 reads | 0 comments |

Detrended_Price_Oscillator - indicator for MetaTrader 5

This indicator looks similar to MA in that it filters price direction (trend) in the same way.

The detrended price oscillator is calculated as follows:

DPO(i) = closing price(i) - SMA(i, N)

Where N — MA period.

The indicator uses the class SmoothAlgorithms.mqh library (copy it to \MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

The indicator was first implemented in MQL4 and published in the code base of mql4.com on September 1, 2008.

Detrended_Price_Oscillator - indicator for MetaTrader 5

Figure 1. Detrended Price Oscillator


Attachment download

📎 detrended_price_oscillator.mq5 (7.19 KB)

📎 SmoothAlgorithms.mqh (130.2 KB)

Source: MQL5 #15288

Verification code Refresh