How to find height of window in pixels?

To add comments, please log in or register
Tony
262
Tony  

Hi all

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.

Cheers

Jellybean

Tony
262
Tony  
(Somehow I got this notification of your response, but it doesn't show here. Strange.)

2010.01.31 12:21 Ais
Hi Please take look at A Sample: Chart Metrics Replace "start" by "init" in case of doubt Best regards


Thanks Ais

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.

Cheers

Jellybean

Airat Safin
1214
Airat Safin  

Hi Jellybean
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.

Best regards

Tony
262
Tony  

Thanks again.

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.

Cheers

Jellybean

To add comments, please log in or register