Can someone please explain the logic behind this, I just began learning mql and I cant seem to understand why is this found in almost all the codes I have read so far.
//---- check for possible errorsif(counted_bars<1) return(-1);
//---- last counted bar will be recountedif(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i = 0; i <= limit; i++) {
counter=i;
Range=0;
AvgRange=0;
for (counter=i ;counter<=i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter]-High[counter]);
}
Can someone please explain the logic behind this, I just began learning mql and I cant seem to understand why is this found in almost all the codes I have read so far.
Range=AvgRange/10;