Announcement

Collapse
No announcement yet.

How to draw text on top of candlesticks?

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

  • How to draw text on top of candlesticks?

    Hello,

    How can I draw text on top of candlesticks? I would like to draw "B" or "S" at exact entry prices of my orders. However it seems it is not possible to draw text on top of candlesticks even if I use Text.ONTOP flag, therefore the candlestick bodies would make those "B" and "S" charactors difficult to read. Is there any good solution? Thanks in advance.

    - Clearpicks

  • #2
    Try this...

    For LONGS

    drawLineRelative(-1,nEntryPrice,1,nEntryPrice, PS_SOLID, 2, Color.green, "nEntry+"+nBarCounter);
    drawTextRelative(0, nEntryPrice, "B" , Color.green, null, Text.ONTOP | Text.CENTER | Text.BOTTOM, null, 9, "B"+nBarCounter);


    for SHORTS

    drawLineRelative(-1,nEntryPrice,1,nEntryPrice, PS_SOLID, 2, Color.red, "nEntry-"+nBarCounter);
    drawTextRelative(0, nEntryPrice, "S" , Color.red, null, Text.ONTOP | Text.CENTER | Text.TOP, null, 9, "S"+nBarCounter);

    nEntryPrice is a variable that holds the actual price you want these levels drawn at.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment

    Working...
    X