Announcement

Collapse
No announcement yet.

Absolute Shape Placement

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

  • Absolute Shape Placement

    Dear experts:

    I hope that one of you can help me position a shape on the screen a bit better. I use the following command to place a shape on the display:

    drawShapeRelative(-2, high(-2) + (high(-2) / 200), Shape.UPARROW,"", Color.lime, Shape.TOP, "");

    The placement is a little off because I tried to position the shape away from the price bar a bit using a relative offset (high()/200). I cannot seem to determine a way to scale an absolute offset. Can anyone please help me understand how to position my shape just a bit above/bellow the bar in a way that does not vary from chart to chart?

    Thanks;

    Burt

  • #2
    Burt
    The solution I adopted was to use
    high()+((high()-low())/10) as the vertical offset on the high and
    low()-((high()-low())/10) for vertical offset on the low.
    You could substitute 10 with any number of choice.
    I am confident that there are better solutions out there, but in the mean time this one is pretty much universally applicable
    Alex

    Comment

    Working...
    X