4TF Has Bar Indicator For MT4

4TF Has Bar Indicator For MT4

The 4TF Has Bar Indicator For MT4 is special tools that shows the strength of the buyers and sellers in the form of block in four different time frame. Usually the default time frame used in the indicators reading are month, weekly, daily and 4 hour time frame. Focus on the critical support and resistance zone when you try to make profit by using this indicator.

FREE 4TF Has Bar Indicator

Download the FREE 4TF Has Bar 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 4TF Has Bar 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 Rads_MTF_HAS_Bar_A.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 4TF Has Bar Indicator For MT4

The 4TF Has Bar Indicator For MT4 has 9 parameters to configure.

extern int MaMetod =2;
extern int MaPeriod=6;
extern int MaMetod2 =3;
extern int MaPeriod2=2;
extern int BarWidth=0;
extern color BarColorUp=Lime;
extern color BarColorDown=Red;
extern color TextColor=White;
extern int MaxBars=500;

Buffers of the 4TF Has Bar Indicator For MT4

The 4TF Has Bar Indicator For MT4 provides 8 buffers.


Main Parts Of The Code

int start()
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars lt 0) return(-1);
//---- the last counted bar will be recounted
   if(counted_bars gt 0) counted_bars--;
   int limit=Bars-counted_bars;
   int i,tf;
   double dif=Time[0] - Time[1];
   for( i=ObjectsTotal()-1; i gt -1; i--)
      if (StringFind(ObjectName(i),"FF_"+UniqueNum+"_") gt =0)  ObjectDelete(ObjectName(i));
   double shift=0.2;
   for( tf=1; tf lt =4; tf++)
      string txt="??";
      double gp;
         case 1: txt=tf2txt(Period_1);  gp=1 + shift; break;
         case 2: txt=tf2txt(Period_2);  gp=1 + Gap + shift; break;
         case 3: txt=tf2txt(Period_3);  gp=1 + Gap*2 + shift; break;
         case 4: txt=tf2txt(Period_4);  gp=1 + Gap*3 + shift; break;
      string name="FF_"+UniqueNum+"_"+tf+"_"+txt;
      ObjectCreate(name, OBJ_TEXT, WindowFind(shortname), iTime(NULL,0,0)+dif*3, gp);
      ObjectSetText(name, txt,8,"Arial", TextColor);
   datetime TimeArray_4[], TimeArray_3[], TimeArray_2[], TimeArray_1[];
   int  i1=0, i2=0, i3=0, i4=0, yy;
   // for(i=0, i1=0,  i2=0,  i3=0,  i4=0;i lt MaxBars;i++)
   for(i=0, i1=0,  i2=0,  i3=0,  i4=0;i lt limit;i++)
      if (i1 lt ArraySize(TimeArray_1)) if (Time[i] lt TimeArray_1[i1]) i1++;
      if (i2 lt ArraySize(TimeArray_2)) if (Time[i] lt TimeArray_2[i2]) i2++;
      if (i3 lt ArraySize(TimeArray_3)) if (Time[i] lt TimeArray_3[i3]) i3++;
      if (i4 lt ArraySize(TimeArray_4)) if (Time[i] lt TimeArray_4[i4]) i4++;
      for( tf=1; tf lt =4; tf++)
         int prd;
            case 1: prd=Period_1; yy=i1;  break;
            case 2: prd=Period_2; yy=i2;  break;
            case 3: prd=Period_3; yy=i3;   break;
            case 4: prd=Period_4; yy=i4;   break;
         haOpen=iCustom(NULL,prd,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,2,yy) ;
         haClose=iCustom(NULL,prd,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,3,yy) ;
            case 1: buf1_down[i]=EMPTY_VALUE;buf1_up[i]=EMPTY_VALUE; if (haOpen gt =haClose)  buf1_down[i]=1;           else buf1_up[i]=1;           break;
            case 2: buf2_down[i]=EMPTY_VALUE;buf2_up[i]=EMPTY_VALUE; if (haOpen gt =haClose)  buf2_down[i]=1 + Gap * 1; else buf2_up[i]=1 + Gap * 1; break;
            case 3: buf3_down[i]=EMPTY_VALUE;buf3_up[i]=EMPTY_VALUE; if (haOpen gt =haClose)  buf3_down[i]=1 + Gap * 2; else buf3_up[i]=1 + Gap * 2; break;
            case 4: buf4_down[i]=EMPTY_VALUE;buf4_up[i]=EMPTY_VALUE; if (haOpen gt =haClose)  buf4_down[i]=1 + Gap * 3; else buf4_up[i]=1 + Gap * 3; break;
void getPeriod()
      case 1:
         Period_1=1; Period_2=5; Period_3=15; Period_4=30;
      case 5:
         Period_1=5; Period_2=15; Period_3=30; Period_4=60;
      case 15:
         Period_1=15; Period_2=30; Period_3=60; Period_4=240;
      case 30:
         Period_1=30; Period_2=60; Period_3=240; Period_4=1440;
      case 60:
         Period_1=60; Period_2=240; Period_3=1440; Period_4=10080;
      case 240:
         Period_1=240; Period_2=1440; Period_3=10080; Period_4=43200;
      case 1440:
         Period_1=1440; Period_2=10080; Period_3=43200; Period_4=43200;
      case 10080:
         Period_1=10080; Period_2=43200; Period_3=43200; Period_4=43200;
      case 43200:
         Period_1=43200; Period_2=43200; Period_3=43200; Period_4=43200;
//|                                                                  |
string tf2txt(int tf)
   if (tf==PERIOD_M1)    return("M1");
   if (tf==PERIOD_M5)    return("M5");
   if (tf==PERIOD_M15)   return("M15");
   if (tf==PERIOD_M30)   return("M30");
   if (tf==PERIOD_H1)    return("H1");
   if (tf==PERIOD_H4)    return("H4");
   if (tf==PERIOD_D1)    return("D1");
   if (tf==PERIOD_W1)    return("W1");
   if (tf==PERIOD_MN1)   return("MN");
/*bool NewBar()
   static datetime dt = 0;  
   if (Time[0] != dt)
      dt = Time[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!