Libraries: GetPaneHeights

 

GetPaneHeights:

This function calculates the heights in pixel of all panes in a window.

Author: kartz

 

Hi,kartz.

It's wonderful.

Can you allow the use of this library source code in my indicator code ?
I do not want to split into two files are.
Because it will cause careless mistake for many people, so I prefer static link.

 
fai:
Can you allow the use of this library source code in my indicator code ?

I do not want to split into two files are.
Because it will cause careless mistake for many people, so I prefer static link.

Hi fai,

Thank you.
You mean you want to "embed" (not #include or #import) GetPaneHeights() in your source code, right?
Sure you can.

 

Hello Kartz,

I'm trying to use the function GetPaneHeights as you described above in a "custom indicator" program. When i load my CI, nothing happen and i can see error message as below in the "expert" card of the client terminal:

2009.09.13 23:12:14 GetPaneHeights EURUSD,Daily: dll calls are not allowed; 'user32.dll'-'GetClientRect'

Do you know how to solve it?



 
kleinmat:

I'm trying to use the function GetPaneHeights as you described above in a "custom indicator" program. When i load my CI, nothing happen and i can see error message as below in the "expert" card of the client terminal:

2009.09.13 23:12:14 GetPaneHeights EURUSD,Daily: dll calls are not allowed; 'user32.dll'-'GetClientRect'

Hi kleinmat,

Please try this: right click on a chart, select "Indicators List (Ctrl+I)", select your CI, select Common tab, and then check the both of "Allow DLL imports" and "Allow external experts (EX4) imports."

 

Tx Kartz

Indeed it's working now.

However i can't get what i want, i.e arrow to be really "sticked" on the graph. Using "GetHeightPane", i still have problem when the scale of the graph is changing for example, or when i'm changing it manually by moving the Y coordinates on the right.

A good example of what im searching for is the indicator "Fractals": whatever the scale is or the zoom performed, arrow will always stay same distance to the low/bottom. Problem is we can't load by default indicator in MetaEditor ... pity

I guess i need to practice more ehehe

Mat

 

is it possible to get the width as well ? it could be usefule if you want to programatically take screenshot that spans the whole main chart window

(afaik you must hardcode dimension with the current library screenshot function)