Why does the difference between WindowPriceMax() and WindowPriceMin on the chart change as you scroll?

 
Doesn't that create an illusion of how the price is changing seeing as the window dimensions are the same?
 

What other behavior are you expecting? These functions do exactly what their names suggest.

Are you still trying to calculate angles? What you are observing now during scrolling is exactly the reason why such a thing simply can not be meaningful, let alone helpful, in any way.

 
Lema_Carl:
Doesn't that create an illusion of how the price is changing seeing as the window dimensions are the same?
The Window dimensions ( pixels ) are the same but the Max and Min PRICE change . . . if you had a lot of small bars followed by a lot of big bars the range of prices on the chart changes dramatically . . . the Y axis scales automatically.
 
The Window dimensions ( pixels ) are the same but the Max and Min PRICE change . . . if you had a lot of small bars followed by a lot of big bars the range of prices on the chart changes dramatically . . . the Y axis scales automatically.
That explains that..If you check out the code I posted in my previous thread, I recalculate the price difference on the y-axis and the number of bars at that moment when I'm looking at the chart which then I use to calculate the pixels per bar and pixels per bar so any changes in the scale or the number of bars would be accounted for. So in essence the angle is the one I get at that moment when Im looking at the chart all factors constant.
Reason: