MQL4 Reference Predefined Variables Bars

MQL4 Help as One File:

int Bars

Number of bars in the current chart.

Example:

  int counter=1;
  for(int i=1; i<=Bars; i++)
    {
     Print(Close[i-1]);
    }

See also

Function Bars, iBars