Is it possible to code in an Auto Price Scale function?

Post Reply
User avatar
RedLineFred
Trader
Posts: 52
Joined: Wed May 01, 2013 6:15 am
Location: Brisbane, Australia

Is it possible to code in an Auto Price Scale function?

Post by RedLineFred »

I have coded an indicator that updates the chart depending on the user's input.
All works as it should, but there are times when the prices to be displayed are higher/lower than the current zoom level on the price scale, and so off chart.

I have tried looking for any code snippets that would allow me to effectively AutoScale, but to no avail.

My thinking is to calculate the max and min prices within the range of bars being displayed and then adjusting the price scale to show these extents.

Can this be achieved? Any clues as to how?

cheers
Fred
Post Reply

Return to “Coders Hangout”