Does anyone know of a way of finding out how many pixels there are between the maximum and minimum prices on the chart window? All I can find is WindowPriceMax() & WindowPriceMin(), which return price units.
2010.01.31 12:21 Ais
take look at A Sample: Chart Metrics Replace "start" by "init" in case of doubt
Your code calculates the vertical resolution in points, but I would like it in pixels on the screen. It's just for aesthetics. I draw a histogram with a vertical scale and horizontal bars. If I use trend lines with the default width they are one pixel wide, so if I know how many pixels the window is high then I can draw a histogram without gaps in it as I enlarge the scale.
I suspect there is a way of getting the window size with a call to a windows function, but I don't know it.
Please zoom out the chart to minimum and fix scale 1:1 in "Chart/Properties" menu.
Then vertical resolution in points will be equal to vertical resolution in pixels.
External function invocation significantly reduce the security and stability of system.
The result may be a significant reduction in system value.
Yes 1:1 scale isn't really usable for me. I'm not going to worry too much about this - it was just for good looks, but I can achieve the same thing by over-doing the number of histogram bars. I thought I could find a more elegant way. Never mind.