I just started working with buttons with drawTextAbsolute and last night had set up a screen of buttons on an advanced chart. Much to my dismay, when I increased the number of bars on my advanced chart, my screen of buttons compressed onto the left side of the screen
, commensurate with the spacing I had specified in my drawTextAbsolute steps and the number of bars on the chart. I should have known this would happen, but alas...
I went looking for a function that would determine the number of bars on the visible chart so I could incorporate this into the code to have the location of the buttons adjust themselves to the number of the bars visible on the chart, but the ones I found dealt with the number of bars loaded, not in the visible chart.
Does anyone know what function I could use to accomplish this?

I went looking for a function that would determine the number of bars on the visible chart so I could incorporate this into the code to have the location of the buttons adjust themselves to the number of the bars visible on the chart, but the ones I found dealt with the number of bars loaded, not in the visible chart.
Does anyone know what function I could use to accomplish this?
Comment