Announcement

Collapse
No announcement yet.

Drawing Labels For Lines

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

  • Drawing Labels For Lines

    drawTextAbsolute(2,xMA1.getValue(0),Length1+"m",Co lor.white,Color.green,Text.FRAME | Text.BOTTOM,null,10,"Fx100");

    I use statements like the above to put a label on some trends lines on my charts. The labels print to the right of the current price and don't clutter up the price bars. When I add $VIX to a chart, however, the labels disappear although the lines remain.

    Does anyone know a way around this problem which occurs with the new version but not with the old version? Thanks.

  • #2
    Labels in v11.1

    I calculate a number of support and resistance lines for my SPY chart, and use a statement like the one below to put a small label in the margin to the right of the current bar.

    drawTextAbsolute(2,Pivot,"PP ",Color.black,Color.khaki,Text.FRAME | Text.BOTTOM,null,7,"PP");

    When I only have SPY on the chart, all works well. If I add a symbol, like $VIX, the labels disappear but the lines remain. I've been working on a solution to this but haven't been successful. This worked fine in v10.6 but not in the current version. Any ideas as to why this happens?

    Thanks.

    Comment

    Working...
    X