vertical chart scroll from EA

 

Does anyone have an idea how I can make a vertical scroll - analogous to ChartNavigate() from the EA?

For example, I want to scroll up the chart so that an object comes into the picture.


I have my own indicators above and below the price in the chart image. To keep them in the image I have CHART_SCALEFIX ChartGetInteger() always on.

 
Willbur:

Does anyone have an idea how I can make a vertical scroll - analogous to ChartNavigate() from the EA?

For example, I want to scroll up the chart so that an object comes into the picture.


I have my own indicators above and below the price in the chart image. To keep them in the image I have CHART_SCALEFIX ChartGetInteger() always on.

Interesting request.

I assume the "indicators" are objects on the time/price and not on the x/y pixels (pivots and sr ?)

If so , on first glance , it would require logging the max and min price of these objects that are within the visible spectrum time wise (x axis)

in order to determine how much "scroll" is available (indicators_max_price-indicators_min_price).

Then to calculate the scroll bar size,would be the size in price (visible_max_price-visible_min_price) of the visible chart (y axis).

The difficulty would be finding out where the scroll bar is ,which would be max-start of visible y price .

And it all depends on how these indicators are branded 

Edit : 

By testing a code for this i discovered mt5 has it already

its a little thin but it does it. : 

Here it is anyway : 

Reason: