Better Volume Indicator For MT5
The Better Volume Indicator For MT5 is known as the users of the technical traders. It uses the algorithm of the volume indicator along with the SMA data for the analysis of the key trend. Those who rely on this manual trading method can have a great advantage with this tool as it can show the price trend with the high level of precision.
As long as the price is going north, you are going to experience frequent green bars in the indicator frame. On the contrary, frequent red bars are going to be printed in the indicator frame as long as the sellers are pushing the price south. You have to find your order setups in the critical supply or resistance level and then the bar of the indicator should be used.
But make sure you are not messing up the chart by using a few more volume indicators along with this tool. Keep things simple and relate the bars in the D1 frame. Use the practice account if things seem hard at the start.
Installing the Better Volume 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 Minions.BetterVolume.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 Better Volume Indicator For MT5
The Better Volume Indicator For MT5 has 2 parameters to configure.
input ENUM_APPLIED_VOLUME inpAppliedVolume = VOLUME_REAL; // Volume Type
input int inpBarsToAnalyze = 20; // N past bars to analyze
Buffers of the Better Volume Indicator For MT5
The Better Volume Indicator For MT5 provides 2 buffers.
SetIndexBuffer( 0, bufferVolume, INDICATOR_DATA );
SetIndexBuffer( 1, bufferColors, INDICATOR_COLOR_INDEX );
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[])
{
int start=prev_calculated-1;
long SMA;
if (rates_total lt 2) { return(0); } // check for rates total
if (start lt 1) { start=1; } // correct position
// calculates the volumes histogram...
for(int i=start; i lt rates_total && !IsStopped(); i++) {
bufferVolume[i] = (double)(paramAppliedVolume==VOLUME_REAL ? volume[i] : tick_volume[i]); // calculates the indicator...
if(paramAppliedVolume==VOLUME_REAL) {
SMA = SMAOnArray(volume, paramBarsToAnalyze, i );
} else {
SMA = SMAOnArray(tick_volume, paramBarsToAnalyze, i );
}
// change candle colors accordingly...
if (open[i] lt close[i] && bufferVolume[i] gt SMA) { bufferColors[i]=1.0; }
else if (open[i] gt close[i] && bufferVolume[i] gt SMA) { bufferColors[i]=2.0; }
else { bufferColors[i]=0.0; }
}
return(rates_total);
}
//+------------------------------------------------------------------+
//| Calculates a SMA over an indicator array... |
//+------------------------------------------------------------------+
long SMAOnArray( const long &array[], int period, int position ) {
long sum = 0;
if (position-period lt = 0) { return false; }
for (int i = position-period+1; i lt =position; i++) {
sum += array[i];
}
return sum / period;
}
//+------------------------------------------------------------------+