iBars for displayed ones only?

 

Hi,

to get a number of bars ona specified chart I use iBars; what do I use to obtain the number of bars visible on the curent chart?

 
Ok; WindowBarsPerChart, right?:-)
 
    top     = WindowPriceMax();
    bot     = WindowPriceMin();
    iLeft   = WindowFirstVisibleBar();
    iRight  = iLeft-WindowBarsPerChart();
    if (iRight < 0) iRight = 0;                             // Chart is shifted.
 
Awesome; thanks, WHRoeder!