PEMA Indicator For MT5

PEMA Indicator For MT5

The PEMA Indicator For MT5 displays a Pentuple Exponential Moving Average (PEMA). As is evident from the name, a five folded Exponential Moving Average of the price of an underlying asset gets calculated. The indicator was originally created by Bruno Pio in 2010.

Two basic types of analysis can be performed using the PEMA Indicator For MT5:

1. EMA Slope - An indicator curve that is consistently rising higher signifies a market in an up trend. Contrarily, an indicator curve that is persistently dipping lower signals a market in a down trend.

2. Price Crossover - When an instrument convincingly closes above the average, it is likely headed higher. Conversely, when price ends beneath the average line, it could potentially test lower levels.

FREE PEMA Indicator

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

The PEMA Indicator For MT5 has 2 parameters to configure.

input int                InpPeriodEMA=14;               // EMA period
input int                InpShift=0;                    // Indicator s shift

Buffers of the PEMA Indicator For MT5

The PEMA Indicator For MT5 provides 9 buffers.

SetIndexBuffer(0,PemaBuffer,INDICATOR_DATA);
SetIndexBuffer(1,Ema1,INDICATOR_CALCULATIONS);
SetIndexBuffer(2,Ema2,INDICATOR_CALCULATIONS);
SetIndexBuffer(3,Ema3,INDICATOR_CALCULATIONS);
SetIndexBuffer(4,Ema4,INDICATOR_CALCULATIONS);
SetIndexBuffer(5,Ema5,INDICATOR_CALCULATIONS);
SetIndexBuffer(6,Ema6,INDICATOR_CALCULATIONS);
SetIndexBuffer(7,Ema7,INDICATOR_CALCULATIONS);
SetIndexBuffer(8,Ema8,INDICATOR_CALCULATIONS);

Main Parts Of The Code

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const int begin,
                const double &price[])
  {
//--- check for data
   if(rates_total lt 8*InpPeriodEMA-8)
      return(0);
//---
   int limit;
   if(prev_calculated==0)
      limit=0;
   else limit=prev_calculated-1;
//--- calculate EMA
   ExponentialMAOnBuffer(rates_total,prev_calculated,0,InpPeriodEMA,price,Ema1);
//--- calculate EMA on EMA array
   ExponentialMAOnBuffer(rates_total,prev_calculated,InpPeriodEMA-1,InpPeriodEMA,Ema1,Ema2);
//--- calculate EMA on EMA array on EMA array
   ExponentialMAOnBuffer(rates_total,prev_calculated,2*InpPeriodEMA-2,InpPeriodEMA,Ema2,Ema3);
   //--- calculate EMA on EMA array on EMA array on EMA array
   ExponentialMAOnBuffer(rates_total,prev_calculated,3*InpPeriodEMA-3,InpPeriodEMA,Ema3,Ema4);
   //--- calculate EMA on EMA array on EMA array on EMA array on EMA array
   ExponentialMAOnBuffer(rates_total,prev_calculated,4*InpPeriodEMA-4,InpPeriodEMA,Ema4,Ema5);
   ExponentialMAOnBuffer(rates_total,prev_calculated,5*InpPeriodEMA-5,InpPeriodEMA,Ema5,Ema6);
   ExponentialMAOnBuffer(rates_total,prev_calculated,6*InpPeriodEMA-6,InpPeriodEMA,Ema6,Ema7);
   ExponentialMAOnBuffer(rates_total,prev_calculated,7*InpPeriodEMA-7,InpPeriodEMA,Ema7,Ema8);
   
//--- calculate PEMA
   
   
   for(int i=limit;i lt rates_total && !IsStopped();i++)
      PemaBuffer[i]=8*Ema1[i]-28*Ema2[i]+56*Ema3[i]-70*Ema4[i]+56*Ema5[i]-28*Ema6[i]+8*Ema7[i]-Ema8[i];
      
//--- OnCalculate done. Return new prev_calculated.
   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.