Announcement

Collapse
No announcement yet.

Reply to "Small Letters in drawTextRelative" at YahooGroups

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

  • Reply to "Small Letters in drawTextRelative" at YahooGroups

    Wave Trader

    How do I print un-capitalized text in the drawTextRelative command? It always capitalizes the text even though it is written in small caps.
    drawTextRelative(0, low() - 0.03125, "B", null, Color.lime, null | Text.ONTOP | Text.BOLD, "Arial", 14, getValue("rawtime") + "B");


    This should print in lower case (although I have no idea what the rawtime flag is there for)
    drawTextRelative(0, low() - 0.03125, "b", null, Color.lime, null | Text.ONTOP | Text.BOLD, "Arial", 14, getValue("rawtime") + "b");

    Alex

  • #2
    The rawtime() is there to provice a unique label to the text drawn. If the labels are the same for each text/line/shape drawn then it will only display the last text/line/shape with that label. While you can have a text and a shape and a line all with the same label and it seems to work ok, you can't have say two lines with the same label or two shapes with the same label.

    This method (using rawtime) will work as long as you are working with charts that are of interval 1 second or longer. Note this is bat better than using getCurrentBarIndex() as a label, since in realtime use you will have multiple zero bars.
    Garth

    Comment


    • #3
      BTW folks, you can leave off the tag parameter for the line, shape, image drawing if you want to in 7.2, it will automatically find a unique label to do it internally.

      Comment


      • #4
        Will it return the unique ID to use so we can use it to delete said lines and text when we want? That would be really slick.

        G
        Garth

        Comment


        • #5
          No, but that's a good idea =).

          Comment

          Working...
          X