VC Indicator For MT5
The VC Indicator For MT5 draws upper and lower barriers in the price chart based on market volatility. Since the tool deals with the volatility index, it is better to use it in a higher time frame. The upper barrier or band acts as the critical resistance level. On the other hand, the lower barrier or band acts as a strong support zone. To improve your trade accuracy, you should try to learn price action trading strategy since it will help you to execute high-quality trades at these two bands. And always try to trade in favor of the long term trend as it reduces the number of losing trades.
Installing the VC 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 VC.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 VC Indicator For MT5
The VC Indicator For MT5 has 1 parameters to configure.
input uint InpPeriod=14; // Period
Buffers of the VC Indicator For MT5
The VC Indicator For MT5 provides 5 buffers.
SetIndexBuffer(0,BufferTop,INDICATOR_DATA);
SetIndexBuffer(1,BufferBottom,INDICATOR_DATA);
SetIndexBuffer(2,BufferMA,INDICATOR_CALCULATIONS);
SetIndexBuffer(3,BufferT,INDICATOR_CALCULATIONS);
SetIndexBuffer(4,BufferB,INDICATOR_CALCULATIONS);
Main Parts Of The Code
int OnCalculate(const int rates_total,
const int prev_calculated,
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[])
{
//--- #AB0= gt 2:0 lt 0AA82 gt 2 1CD5@ gt 2 :0: B09 lt A5@89
ArraySetAsSeries(high,true);
ArraySetAsSeries(low,true);
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
if(rates_total lt 4) return 0;
//--- @ gt 25@:0 8 @0AGQB : gt ;8G5AB20 ?@ gt AG8BK205 lt KE 10@ gt 2
int limit=rates_total-prev_calculated;
if(limit gt 1)
{
limit=rates_total-1;
ArrayInitialize(BufferTop,EMPTY_VALUE);
ArrayInitialize(BufferBottom,EMPTY_VALUE);
ArrayInitialize(BufferMA,0);
ArrayInitialize(BufferT,0);
ArrayInitialize(BufferB,0);
}
//--- gt 43 gt B gt 2:0 40==KE
int count=(limit gt 1 ? rates_total : 1),copied=0;
copied=CopyBuffer(handle_ma,0,0,count,BufferMA);
if(copied!=count)
return 0;
for(int i=limit; i gt =0 && !IsStopped(); i--)
{
BufferT[i]=2.0*BufferMA[i]-high[i];
BufferB[i]=2.0*BufferMA[i]-low[i];
}
//--- 0AGQB 8=48:0B gt @0
for(int i=limit; i gt =0 && !IsStopped(); i--)
{
int bh=ArrayMaximum(BufferT,i,period);
int bl=ArrayMinimum(BufferB,i,period);
if(bh==WRONG_VALUE || bl==WRONG_VALUE)
continue;
double max=BufferT[bh];
double min=BufferB[bl];
BufferTop[i]=fmax(max,BufferT[i]);
BufferBottom[i]=fmin(min,BufferB[i]);
}
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+