PFE Indicator For MT5

PFE Indicator For MT5

The PFE Indicator For MT5 analyzes the rate of change in the price with the help of the fast and slow moving average. The indicators which are based on the core principle of moving average always generate late signals. But this tool can be used to find the best possible reversal zone with a high level of accuracy. Signal curve trading below the reference line zero, suggest you look for the short trade setups only. On the contrary, when the signal curve trades above the reverence line zero, you should be looking to execute the long trades only. But make sure you use the knowledge of supply and demand zone to place the trade.

FREE PFE Indicator

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

The PFE Indicator For MT5 has 8 parameters to configure.

input uint PfePeriod=5;
input Smooth_Method XMA_Method=MODE_JJMA;//ìåòîä óñðåäíåíèÿ
input uint XLength=5;                    //ãëóáèíà ñãëàæèâàíèÿ
input int XPhase=100;                    //ïàðàìåòð ñãëàæèâàíèÿ,
input Applied_price_ IPC=PRICE_CLOSE_;   //öåíîâàÿ êîíñòàíòà
input int Shift=0;                       //ñäâèã èíäèêàòîðà ïî ãîðèçîíòàëè â áàðàõ
input double UpLevel=+0.5;               //óðîâåíü ïåðåêóïëåííîñòè
input double DnLevel=-0.5;               //óðîâåíü ïåðåïðîäàííîñòè

Buffers of the PFE Indicator For MT5

The PFE Indicator For MT5 provides 2 buffers.

SetIndexBuffer(0,IndBuffer,INDICATOR_DATA);
SetIndexBuffer(1,ColorIndBuffer,INDICATOR_COLOR_INDEX);

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(rates_total lt min_rates_total) return(0);

//---- Îáúÿâëåíèå ïåðåìåííûõ ñ ïëàâàþùåé òî÷êîé  
   double noise,pfe;
//---- Îáúÿâëåíèå öåëûõ ïåðåìåííûõ è ïîëó÷åíèå óæå ïîñ÷èòàííûõ áàðîâ
   int first,bar;

//---- ðàñ÷¸ò ñòàðòîâîãî íîìåðà first äëÿ öèêëà ïåðåñ÷¸òà áàðîâ
   if(prev_calculated gt rates_total || prev_calculated lt =0) // ïðîâåðêà íà ïåðâûé ñòàðò ðàñ÷¸òà èíäèêàòîðà
     {
      first=min_rates_1; // ñòàðòîâûé íîìåð äëÿ ðàñ÷¸òà âñåõ áàðîâ
     }
   else first=prev_calculated-1; // ñòàðòîâûé íîìåð äëÿ ðàñ÷¸òà íîâûõ áàðîâ

//---- Îñíîâíîé öèêë ðàñ÷¸òà èíäèêàòîðà
   for(bar=first; bar lt rates_total && !IsStopped(); bar++)
     {
      noise=_Point;
      for(int kkk=0; kkk lt int(PfePeriod); kkk++) noise+=MathAbs(PriceSeries(IPC,bar-kkk,open,low,high,close)-PriceSeries(IPC,bar-kkk-1,open,low,high,close));      
      pfe=(PriceSeries(IPC,bar,open,low,high,close)-PriceSeries(IPC,bar-PfePeriod,open,low,high,close))/noise;
      IndBuffer[bar]=XMA1.XMASeries(min_rates_1,prev_calculated,rates_total,XMA_Method,XPhase,XLength,pfe,bar,false);
     }

   if(prev_calculated gt rates_total || prev_calculated lt =0) first=min_rates_total;
//---- Îñíîâíîé öèêë ðàñêðàñêè èíäèêàòîðà
   for(bar=first; bar lt rates_total && !IsStopped(); bar++)
     {
      int bar1=bar-1;
      int clr=0;

      if(IndBuffer[bar] gt =0)
        {
         if(IndBuffer[bar] gt IndBuffer[bar1]) clr=0;
         if(IndBuffer[bar] lt IndBuffer[bar1]) clr=1;
         if(IndBuffer[bar]==IndBuffer[bar1]) clr=int(ColorIndBuffer[bar1]);
        }

      if(IndBuffer[bar] lt 0)
        {
         if(IndBuffer[bar] lt IndBuffer[bar1]) clr=2;
         if(IndBuffer[bar] gt IndBuffer[bar1]) clr=3;
         if(IndBuffer[bar]==IndBuffer[bar1]) clr=int(ColorIndBuffer[bar1]);
        }
      ColorIndBuffer[bar]=clr;
     }
//----         
   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.