Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4

Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4

The Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4 allows the traders to find the direction of the market trend in the available time frame. But if you use the direction of the indicator, you should rely on the higher period. When you trade the lower period, make sure you try to trade the key support and resistance levels only.

FREE Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator

Download the FREE Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously 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 Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously 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 AllFramesTrend.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 Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4

The Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4 has 16 parameters to configure.

extern int method = 3;
extern int price = 5;
extern int M1 = 0;
extern int M1_per = 5;
extern int M5 = 1;
extern int M5_per = 5;
extern int M15 = 1;
extern int M15_per = 5;
extern int M30 = 1;
extern int M30_per = 5;
extern int H1 = 0;
extern int H1_per = 5;
extern int H4 = 0;
extern int H4_per = 5;
extern int D1 = 0;
extern int D1_per = 5;

Buffers of the Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4

The Simple Indicator that Shows MA Moving Direction on All Timeframes Simultaneously Indicator For MT4 provides 2 buffers.

SetIndexBuffer(0, buffer0);
SetIndexBuffer(1, buffer1);

Main Parts Of The Code

int start()
{
  ExtCountedBars = IndicatorCounted();
  if (ExtCountedBars  lt  0) return(-1);
  if (ExtCountedBars  gt  0) ExtCountedBars--;
  
  int pos = Bars - 1;
  if(ExtCountedBars  gt  2) pos = Bars - ExtCountedBars - 1;
  double M1_cur, M1_prev, M5_cur, M5_prev, M15_cur, M15_prev, M30_cur, M30_prev, H1_cur, H1_prev, H4_cur, H4_prev, D1_cur, D1_prev;
  int shift;
  
  while(pos  gt = 0)
  {
    if(M1 == 1)
    {
      shift = iBarShift(NULL, PERIOD_M1, Time[pos])+1;
      M1_cur = iMA(NULL, PERIOD_M1, M1_per, 0, method, price, shift);
      M1_prev = iMA(NULL, PERIOD_M1, M1_per, 0, method, price, shift+1);
    }
    if(M5 == 1)
    {
      shift = iBarShift(NULL, PERIOD_M5, Time[pos])+1;
      M5_cur = iMA(NULL, PERIOD_M5, M5_per, 0, method, price, shift);
      M5_prev = iMA(NULL, PERIOD_M5, M5_per, 0, method, price, shift+1);
    }
    if(M15 == 1)
    {
      shift = iBarShift(NULL, PERIOD_M15, Time[pos])+1;
      M15_cur = iMA(NULL, PERIOD_M15, M15_per, 0, method, price, shift);
      M15_prev = iMA(NULL, PERIOD_M15, M15_per, 0, method, price, shift+1);
    }
    if(M30 == 1)
    {
      shift = iBarShift(NULL, PERIOD_M30, Time[pos])+1;
      M30_cur = iMA(NULL, PERIOD_M30, M30_per, 0, method, price, shift);
      M30_prev = iMA(NULL, PERIOD_M30, M30_per, 0, method, price, shift+1);
    }
    if(H1 == 1)
    {
      shift = iBarShift(NULL, PERIOD_H1, Time[pos])+1;
      H1_cur = iMA(NULL, PERIOD_H1, H1_per, 0, method, price, shift);
      H1_prev = iMA(NULL, PERIOD_H1, H1_per, 0, method, price, shift+1);
    }
    if(H4 == 1)
    {
      shift = iBarShift(NULL, PERIOD_H4, Time[pos])+1;
      H4_cur = iMA(NULL, PERIOD_H4, H4_per, 0, method, price, shift);
      H4_prev = iMA(NULL, PERIOD_H4, H4_per, 0, method, price, shift+1);
    }
    if(D1 == 1)
    {
      shift = iBarShift(NULL, PERIOD_D1, Time[pos])+1;
      D1_cur = iMA(NULL, PERIOD_D1, D1_per, 0, method, price, shift);
      D1_prev = iMA(NULL, PERIOD_D1, D1_per, 0, method, price, shift+1);      
    }
    
    shift = iBarShift(NULL, 0, Time[pos]);
    if(Period() == 1) current = iMA(NULL, 0, M1_per, 0, method, price, shift);
    if(Period() == 5) current = iMA(NULL, 0, M5_per, 0, method, price, shift);
    if(Period() == 15) current = iMA(NULL, 0, M15_per, 0, method, price, shift);
    if(Period() == 30) current = iMA(NULL, 0, M30_per, 0, method, price, shift);
    if(Period() == 60) current = iMA(NULL, 0, H1_per, 0, method, price, shift);
    if(Period() == 240) current = iMA(NULL, 0, H4_per, 0, method, price, shift);
    if(Period() == 1440) current = iMA(NULL, 0, D1_per, 0, method, price, shift);
    //current = iMA(NULL, 0, "M" + Period() + "_per", 0, method, price, shift);
    
    if(((M1_cur  gt  M1_prev) || M1 == 0) && ((M5_cur  gt  M5_prev) || M5 == 0) && ((M15_cur  gt  M15_prev) || M15 == 0) && ((M30_cur  gt  M30_prev) || M30 == 0) && ((H1_cur  gt  H1_prev) || H1 == 0) && ((H4_cur  gt  H4_prev) || H4 == 0) && ((D1_cur  gt  D1_prev) || D1 == 0)) buffer0[pos] = current;
    if(((M1_cur  lt  M1_prev) || M1 == 0) && ((M5_cur  lt  M5_prev) || M5 == 0) && ((M15_cur  lt  M15_prev) || M15 == 0) && ((M30_cur  lt  M30_prev) || M30 == 0) && ((H1_cur  lt  H1_prev) || H1 == 0) && ((H4_cur  lt  H4_prev) || H4 == 0) && ((D1_cur  lt  D1_prev) || D1 == 0)) buffer1[pos] = current;
    pos--;
  }
  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:  

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.