Documentationmql4 DocumentationMQL4 ReferencePredefined VariablesBarsBarsint BarsNumber 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,iBarsLast updated on 2026-06-26AskBid