PDI Indicator For MT5

PDI Indicator For MT5

The PDI Indicator For MT5 is a price difference signal indicator. The indicator generates diamond-shaped signals at the top or bottom of candlesticks/bars depending on the difference between the applied price of the previous candlestick/bar and the current candlestick/bar.

Traders set the applied price they want the indicator to use in the input parameters. They also define the threshold of the price difference that should be used in generating the signals. In simple terms, the indicator generates signals when this set threshold is hit.

When the difference between the prices is positive the signal is placed at the bottom of the current candlestick/bar. When the difference between the prices is negative, the generated signal is placed on top of the candlestick/bar.

The signals placed on the top of the candlesticks are red while those placed below the candlesticks are green.

By indicating the price difference between he applied prices of the previous and current candlestick, the trader can predict the direction that the market is going to take in the short term.

FREE PDI Indicator

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

The PDI Indicator For MT5 has 2 parameters to configure.

input int                  InpDifference     =  100;           // Price difference
input ENUM_APPLIED_PRICE   InpAppliedPrice   =  PRICE_CLOSE;   // Applied price

Buffers of the PDI Indicator For MT5

The PDI Indicator For MT5 provides 3 buffers.

SetIndexBuffer(0,BufferUP,INDICATOR_DATA);
SetIndexBuffer(1,BufferDN,INDICATOR_DATA);
SetIndexBuffer(2,BufferMA,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[])
  {
//--- #AB0= gt 2:0  lt 0AA82 gt 2 1CD5@ gt 2 :0: B09 lt A5@89
   ArraySetAsSeries(high,true);
   ArraySetAsSeries(low,true);
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
   if(rates_total lt 4 || Point()==0) 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-4;
      ArrayInitialize(BufferUP,EMPTY_VALUE);
      ArrayInitialize(BufferDN,EMPTY_VALUE);
      ArrayInitialize(BufferMA,0);
     }
//---  gt 43 gt B gt 2:0 40==KE
   int count=(limit gt 1 ? rates_total : 1),copied=0;
   copied=CopyBuffer(handle_ma,0,0,count,BufferMA);
   if(copied!=count) return 0;

//---  0AGQB 8=48:0B gt @0
   for(int i=limit; i gt =0 && !IsStopped(); i--)
     {
      if(InpDifference gt 0)
        {
         if(BufferMA[i]-BufferMA[i+1] gt diff)
            BufferUP[i]=low[i];
         else
            BufferUP[i]=EMPTY_VALUE;
         //---
         if(BufferMA[i]-BufferMA[i+1] lt -diff)
            BufferDN[i]=high[i];
         else
            BufferDN[i]=EMPTY_VALUE;
        }
     }

//--- 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.