Window Height/Width in Pixels

 
Hello there,

In MQL4 how can one programatically determine the height/width in pixels of the window that a script/indicator/expert is attached to?

i.e. If the script/indicator/expert is attached to the main chart window then how can I obtain the height/width in pixels of the main chart window.

i.e. If the script/indicator/expert is attached to a seperate indicator window then how can I obtain the height/width in pixels of that seperate indicator window.

I need the pixel height of the current window that a script/indicator/expert is attached to so that I can properly position objects craeted with the OBJ_LABEL property.

Regards,

Laurence.
 
Bump; can anyone offer any insight into my query?
 
Laurence,
if you are going to position labels that follow price and time then you will have great difficulty using pixels method of label placement due to the scaling of MT4 charts. Use WindowBarsPerChart, WindowPriceMin and WindowPriceMax to get approximate range for drawing and go from there.

If you want labels to remain stationary on chart, use the ObjectSet(LineName,OBJPROP_CORNER,CornerInt); function to pick a corner of the chart then build your label(s) from a corner.

You can get the approximate size of the current chart in pixels by inserting a text label onto the chart from the tool bar then dragging it to the bottom right corner, then open properties and get the x and y coordinates. I do not know how to get pixels with a command.

WRR