Is there any way to access/set the height of the window pane used for studies in an advanced chart?
What I am trying to do is consistently draw a button in the upper-right corner of a study window. But since the y-axis coordinate of DrawTextAbsolute() is specified in terms of raw units (eg. # shares of volume) not percentage of visible window height, I am having to jump through hoops to guess what y-axis to use. In one case I have to look back 73 bars (the number that fit in my window), find the max, and then draw the button based on that value. But if I resize the window, or zoom in, etc. my guess breaks down.
Much better would be a command like GetStudyWindowHeight() to return the height in raw units.
Or perhaps the EFS folks could add a flag in DrawTextAbsolute to allow for the x- and y-axes to be specified as % of visible window area. To plot in the upper right corner, then all I would need to do is draw at (100,100) -- 100% to the right, 100% up.
If you have a workaround for this issue, I'd love to hear it.
What I am trying to do is consistently draw a button in the upper-right corner of a study window. But since the y-axis coordinate of DrawTextAbsolute() is specified in terms of raw units (eg. # shares of volume) not percentage of visible window height, I am having to jump through hoops to guess what y-axis to use. In one case I have to look back 73 bars (the number that fit in my window), find the max, and then draw the button based on that value. But if I resize the window, or zoom in, etc. my guess breaks down.
Much better would be a command like GetStudyWindowHeight() to return the height in raw units.
Or perhaps the EFS folks could add a flag in DrawTextAbsolute to allow for the x- and y-axes to be specified as % of visible window area. To plot in the upper right corner, then all I would need to do is draw at (100,100) -- 100% to the right, 100% up.
If you have a workaround for this issue, I'd love to hear it.
Comment