Announcement

Collapse
No announcement yet.

Height of study window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Height of study window

    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.

  • #2
    five-at-a-half,

    Yes there is a way using drawTextPixel. Here is a link to a file or two which you can use as an example....

    Actually, let me rephrase that, you can stick the button in the upper right corner, you cannot adust the height of a study window. That is a good idea, it would be nice to adjust the size of the various windows from within an efs.
    Last edited by ; 01-11-2004, 08:28 PM.

    Comment


    • #3
      Steve--

      Thanks for the example files.

      Chris

      Comment

      Working...
      X