3rd Generation Moving Average Indicator For MT4

3rd Generation Moving Average Indicator For MT4

The 3rd Generation Moving Average Indicator For MT4 is an advanced variant of the Simple Moving Average that has a decreasing temporal lag based on an increase in the time period for which the Moving Average is calculated.

FREE 3rd Generation Moving Average Indicator

Download the FREE 3rd Generation Moving Average Indicator for MT4.

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 3rd Generation Moving Average Indicator For MT4

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

Parameters of the 3rd Generation Moving Average Indicator For MT4

The 3rd Generation Moving Average Indicator For MT4 has 4 parameters to configure.

extern int MA_Period=220;
extern int MA_Sampling_Period=50; // Sampling period should be less than 1/4 of MA_Period
extern int MA_Method=1; //0 - SMA, 1 - EMA, 2 - SMMA, 3 - LWMA
extern int MA_Applied_Price=5; // 0 - PRICE_CLOSE, 1 - PRICE_OPEN, 2 - PRICE_HIGH, 3 - PRICE_LOW, 4 - PRICE_MEDIAN, 5 - PRICE_TYPICAL, 6 - PRICE_WEIGHTED

Buffers of the 3rd Generation Moving Average Indicator For MT4

The 3rd Generation Moving Average Indicator For MT4 provides 2 buffers.

SetIndexBuffer(0,MA3G);
SetIndexBuffer(1,MA1);

Main Parts Of The Code

int start()
  {
   int i;
//---
   if(MA_Period*2 lt MA_Sampling_Period)
     {
      Print("MA_Period should be  gt = MA_Sampling_Period * 2.");
      return(-1);
     }
   if(Bars  lt = MA_Period) return(0);
   int ExtCountedBars=IndicatorCounted();
//---- check for possible errors
   if(ExtCountedBars  lt  0) return(-1);
//---- last counted bar will be recounted
   if(ExtCountedBars gt 0) ExtCountedBars--;
   if(ExtCountedBars lt MA_Period) ExtCountedBars=MA_Period;
//----
   for(i=Bars-ExtCountedBars-1; i gt =0; i--)
      MA1[i]=iMA(NULL,0,MA_Period,0,MA_Method,MA_Applied_Price,i);
//---
   for(i=Bars-ExtCountedBars-1; i gt =0; i--)
     {
      double MA2=iMAOnArray(MA1,0,MA_Sampling_Period,0,MA_Method,i);
      MA3G[i]=(Alpha+1)*MA1[i]-Alpha*MA2;
     }
//---- done
   return(0);
  }
//+------------------------------------------------------------------+

 

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:  

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.

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