Announcement

Collapse
No announcement yet.

Displaying Text Location

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

  • Displaying Text Location

    I am having difficulty displaying text in a specific location. I am using drawTextRelative and everything is correct except the location along the y-axis.

    Please refer to the attached chart and to my efs code. I am using a 12 tick range bar chart on 6C. I am displaying lines at the location to indicate where a new bar would be formed. These lines are correct. I am trying to display the price value of that line. The price is also correct. I'd like the location to be just below the upper line.

    Also, the price for the lower line should be 9638 and it is not shown anywhere on the chart. I'd like that to be just above the lower line.

    EFS code:
    drawTextRelative(+2, (low(0) + .0009), (low(0) + .0013), Color.black, null, Text.PRESET | Text.BOLD | Text.ONTOP, "Arial", 15, 200);
    drawTextRelative(+2, (high(0) - .0009), (high(0) - .0013), Color.black, null, Text.PRESET | Text.BOLD | Text.ONTOP, "Arial", 15, 201);



    Thanks for the help.

  • #2
    Re: Displaying Text Location

    pjkowalski
    FYI no chart or efs are attached to your post (note that you can only attach one file per post)
    That said the usage of the Text.PRESET flag is incorrect in the code example you posted as this should be used only in conjunction with the location flags [eg AboveBar1, BelowBar1, etc]
    For the syntax of the drawTextRelative() function - and specifically the Text.PRESET flag - see this article in the EFS KnowledgeBase
    Alex


    Originally posted by pjkowalski
    I am having difficulty displaying text in a specific location. I am using drawTextRelative and everything is correct except the location along the y-axis.

    Please refer to the attached chart and to my efs code. I am using a 12 tick range bar chart on 6C. I am displaying lines at the location to indicate where a new bar would be formed. These lines are correct. I am trying to display the price value of that line. The price is also correct. I'd like the location to be just below the upper line.

    Also, the price for the lower line should be 9638 and it is not shown anywhere on the chart. I'd like that to be just above the lower line.

    EFS code:
    drawTextRelative(+2, (low(0) + .0009), (low(0) + .0013), Color.black, null, Text.PRESET | Text.BOLD | Text.ONTOP, "Arial", 15, 200);
    drawTextRelative(+2, (high(0) - .0009), (high(0) - .0013), Color.black, null, Text.PRESET | Text.BOLD | Text.ONTOP, "Arial", 15, 201);



    Thanks for the help.

    Comment


    • #3
      Sorry, I must have mis-clicked. It was there at one point.
      Attached Files

      Comment


      • #4
        pjkowalski
        See my previous reply as to the reason of the issue you are having
        Alex


        Originally posted by pjkowalski
        Sorry, I must have mis-clicked. It was there at one point.

        Comment

        Working...
        X