Val_Bands Indicator For MT5

Val_Bands Indicator For MT5

The Val_Bands Indicator For MT5 uses the Bollinger band formula and draws important colored histogram bars that tell the traders about the direction of the major trend. Red color bars forming in the indicator window shows the bears are dominating the market. On the contrary, green color bars show the strength of the bulls. If you spot the yellow color bars, you need to wait for the reversal. You also notice the three moving average bands in the indicator window since it tells you about the overbought and oversold condition of the market. When the green bars trades above the yellow line, it means the market is in the overbought region. Similarly, if the green bars trade the above the yellow line it means the market is in the oversold region. Learn to use this tool in the demo account so that you don’t have become confused by seeing the readings in the real market.

FREE Val_Bands Indicator

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

The Val_Bands Indicator For MT5 has 2 parameters to configure.

input int BandsPeriod=14;         // Calculation period
input double BandsDeviations=1.0; // Standard deviation size

Buffers of the Val_Bands Indicator For MT5

The Val_Bands Indicator For MT5 provides 5 buffers.


Main Parts Of The Code

int OnCalculate(const int rates_total,    // number of bars in history at the current tick
                const int prev_calculated,// number of bars calculated at previous call
                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[])
//---- checking the number of bars to be enough for the calculation
   if(BarsCalculated(HMA_Handle) lt rates_total
      || BarsCalculated(LMA_Handle) lt rates_total
      || rates_total lt min_rates_total)

//---- declarations of local variables 
   int to_copy,limit,bar,k;
   double HMA[],LMA[];
   double sum,oldval,newres,deviation;

//---- calculations of the necessary amount of data to be copied
//---- and the  limit  starting index for the bars recalculation loop
   if(prev_calculated gt rates_total || prev_calculated lt =0)// checking for the first start of the indicator calculation
      to_copy=rates_total;                 // calculated number of all bars
      limit=rates_total-min_rates_total-1; // starting index for calculation of all bars
      limit=rates_total-prev_calculated;  // starting index for calculation of new bars
      to_copy=limit+1;                    // calculated number of new bars only

//--- copy newly appeared data in the arrays
   if(CopyBuffer(HMA_Handle,0,0,to_copy,HMA) lt =0) return(RESET);
   if(CopyBuffer(LMA_Handle,0,0,to_copy,LMA) lt =0) return(RESET);

//---- indexing elements in arrays as timeseries  

//---- first indicator calculation loop
   for(bar=limit; bar gt =0 && !IsStopped(); bar--)

//---- the second indicator calculation loop
   for(bar=limit; bar gt =0 && !IsStopped(); bar--)

      while(k gt =bar)



      if(ValBuffer[bar] gt UpBuffer[bar]) ColorValBuffer[bar]=3;
      else if(ValBuffer[bar] gt MaBuffer[bar]) ColorValBuffer[bar]=2;
      else if(ValBuffer[bar] gt DownBuffer[bar]) ColorValBuffer[bar]=1;


About Me

I'm Mike Semlitsch the owner of 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!