First bar in current view

Hello,
I want to find out what is the first bar in the current visible view. Idea is to always plot text in left side of window regardless of zooming in/out. TIA

Please check AFL functions list. All there.

bi = BarIndex();// array
fvb = FirstVisibleValue(bi);// number, first visible bar
PlotTextSetFont( "\u260E", "Symbola", size = 16, fvb, y = Status("axisminy"), colorRed );

If you want to shift to left then add number to fvb e.g. fvb+1

4 Likes

Thank you very much.