I have two 1-Hour charts open for the same symbol. One's showing 10 days worth of bars and the other one's showing 1 year's worth of bars. I have the same custom indicator sitting on both of these charts which writes the number of bars to the log and prints some statistics for bars on the chart itself.
The Bars variable for both cases returns the larger number of bars - i.e. that for a period of 1 year. This is clearly not the desired behaviour as I would like different statistical information for different periods.
Also, if you zoom out of the chart with the smaller period, you can actually see the indicator print out strings in places where there are no visible bars.
Also, unrelated to this I would like to add that the bar furthest back in time (i.e. the first bar on the chart) is just beyond the visible range. If you hover the mouse to the edge of the screen, you can see it's information in the "Info Window" but not the bar itself.