Percentage Price Oscillator Indicator For MT5

Percentage Price Oscillator Indicator For MT5

The Percentage Price Oscillator Indicator For MT5 is also called the PPO indicator and calculates the volatility in the market as well as the direction of the trend. With this indicator you will even be able to spot regular divergences to anticipate trend reversals. The calculation of the indicator is based on 3 Exponential Moving Averages with different calcualtion periods. As a result you will see histogram in an indicator subwindow that draws blue zones during upward trends and orange zones during downward trends.

FREE Percentage Price Oscillator Indicator

Download the FREE Percentage Price Oscillator Indicator for MT5.

To receive my email 100% sure: 
Put my email on your whitelist!


Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

My Recommended MT4/MT5 Broker


Installing the Percentage Price Oscillator Indicator For MT5

After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file PPO.mq5 into the folder MQL5\Indicators of your MT5 installation. After that please restart MT5 and then you will be able to see the indicator in the list of indicators.

Parameters of the Percentage Price Oscillator Indicator For MT5

The Percentage Price Oscillator Indicator For MT5 has 3 parameters to configure.

input int                inpFastPeriod = 9;           // Fast calculation period
input int                inpSlowPeriod = 26;          // Slow calculation period
input ENUM_APPLIED_PRICE inpPrice      = PRICE_CLOSE; // Price

Buffers of the Percentage Price Oscillator Indicator For MT5

The Percentage Price Oscillator Indicator For MT5 provides 4 buffers.


Main Parts Of The Code

int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
   if(Bars(_Symbol,_Period) lt rates_total) return(prev_calculated);

   int i=(int)MathMax(prev_calculated-1,1); for(; i lt rates_total && !_StopFlag; i++)
      double _price = getPrice(inpPrice,open,close,high,low,i,rates_total);
      double _emasl = iEma(_price,inpSlowPeriod,i,rates_total,0);
      val[i]=(_emasl!=0) ?(iEma(_price,inpFastPeriod,i,rates_total,1)-_emasl)/_emasl : 0;
      valc[i]  = (i gt 0) ? (val[i] gt val[i-1]) ? 1 : (val[i] lt val[i-1]) ? 2 : valc[i-1] : 0;
      fillu[i] = val[i];
      filld[i] = 0;
   return (i);
//| Custom functions                                                 |
double workEma[][2];
//|                                                                  |
double iEma(double price,double period,int r,int _bars,int instanceNo=0)
   if(ArrayRange(workEma,0)!=_bars) ArrayResize(workEma,_bars);

   if(r gt 0 && period gt 1)
//|                                                                  |
double getPrice(ENUM_APPLIED_PRICE tprice,const double &open[],const double &close[],const double &high[],const double &low[],int i,int _bars)
      case PRICE_CLOSE:     return(close[i]);
      case PRICE_OPEN:      return(open[i]);
      case PRICE_HIGH:      return(high[i]);
      case PRICE_LOW:       return(low[i]);
      case PRICE_MEDIAN:    return((high[i]+low[i])/2.0);
      case PRICE_TYPICAL:   return((high[i]+low[i]+close[i])/3.0);
      case PRICE_WEIGHTED:  return((high[i]+low[i]+close[i]+close[i])/4.0);


About Me

I'm Mike Semlitsch the owner of My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group

Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.