Looping thru chart data, Questions ?

 

I have this code..

int limit, records;

int counted_bars = IndicatorCounted();

limit = Bars - counted_bars;

if ( counted_bars < 0 ) return(0);

if ( counted_bars ==0 ) limit=Bars-1;

for(int i = 0; i < limit; i++)

{

...do something with i

records += 1;

}

Q1: So when I look at a chart is this loop for "i" going from right to left or left to right thu data.

Q2: When I do record count of bars, I get something like 2600. So to work out years of data I could take 260 trading days in a year. 2600/260 = 10 years , is this correct approx ?

Q3: I can get iclose for a bar on the chart, how do I get the date/time of the bar ?