how to limit the NUMBER of bars to count for an indicator? - page 2

 
WindowFirstVisibleBar( ) is the index of leftest bar displaied inside window.

more better since only draw you can see. those ouside the window, can not see so no need to draw.
only those inside window need to draw.

but some time MT may delay refresh since MT only fresh indicator calaulation if there are new price come.
you can refresh manual by click refresh menu on righ-click menus.
Reason: