This is because in MQL4 an array can be either a normal array or an 'indicator buffer' and they are both declared as a standard array.
ie if you have this:
double array0[];
double array1[];
int init() {
IndicatorBuffers(1);
SetIndexBuffer(0, array1);
}
Then array0 is a normal array, ie forward indexed, array0[0] is the oldest value
However because array1 is set as a buffer MT4 performs some behind the scenes changes to make it behave like NT dataSeries, ie reverse indexed, array1[0] is the most recent value
Another thing you will often see in MT4 indicators is BarsCounted, that is just a counter for how many bars the indicator has processed so it is equivalent to CurrentBar in NT.
See the attached example for more info
Comment