PDO Indicator For MT5

PDO Indicator For MT5

The PDO Indicator For MT5 displays the difference between a Moving Average indicator and the current closing price, expressing it as a percentage of the Moving Average. Users have the option to choose the average type and look back period. The PDO (Percent Difference Oscillator) gets plotted as an Olive Green curve that swings above and under a zero line.

Zero level crossovers can be used to generate signals that align with the broader market direction. In case of an underlying up trend, traders should look for an oscillator climb in to positive territory; while, during an ongoing bearish market trend, PDO dips in to negative territory represent valid shorting opportunities. The indicator may be applied on any chart time scale.

FREE PDO Indicator

Download the FREE PDO 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 PDO 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 PDO.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 PDO Indicator For MT5

The PDO Indicator For MT5 has 3 parameters to configure.

input uint                 InpPeriod         =  14;            // Period
input ENUM_MA_METHOD       InpMethod         =  MODE_SMA;      // Method
input ENUM_APPLIED_PRICE   InpAppliedPrice   =  PRICE_CLOSE;   // Applied price

Buffers of the PDO Indicator For MT5

The PDO Indicator For MT5 provides 3 buffers.

SetIndexBuffer(0,BufferPDO,INDICATOR_DATA);
SetIndexBuffer(1,BufferMA1,INDICATOR_CALCULATIONS);
SetIndexBuffer(2,BufferMAP,INDICATOR_CALCULATIONS);

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[])
  {
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
   if(rates_total lt 4) return 0;
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
   int limit=rates_total-prev_calculated;
   if(limit gt 1)
     {
      limit=rates_total-1;
      ArrayInitialize(BufferPDO,EMPTY_VALUE);
      ArrayInitialize(BufferMA1,0);
      ArrayInitialize(BufferMAP,0);
     }
//---  gt 43 gt B gt 2:0 40==KE
   int count=(limit gt 1 ? rates_total : 1),copied=0;
   copied=CopyBuffer(handle_ma1,0,0,count,BufferMA1);
   if(copied!=count) return 0;
   copied=CopyBuffer(handle_maP,0,0,count,BufferMAP);
   if(copied!=count) return 0;
//---  0AGQB 8=48:0B gt @0
   for(int i=limit; i gt =0 && !IsStopped(); i--)
     {
      double MA=BufferMAP[i];
      double Pr=BufferMA1[i];
      BufferPDO[i]=(MA!=0 ? 100.0*(Pr-MA)/MA : 0);
     }

//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

 

About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. 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.