Announcement

Collapse
No announcement yet.

DrawTextRelative question

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

  • DrawTextRelative question

    I modified an Alexis Pivot Point All 3 efs because after doing a search of the board, I couldn't find exactly what I wanted. I wanted the PP value, along with some text, at the end of the PP line.

    I am not able to insert an image. [IMG] code is set to off. As the saying goes, a picture is worth words, so I will leave the image explanations.

    The first image is a chart with auto scale on. I used a +10 and a -10, see code below, to put the text in this position. I'll try to explain the +10 and -10 values with the other images.

    The second image is with the price value of the chart compressed. I get this same result with just time value compressed and that is the reason for the +10 and -10 in the coding. I needed to exaggerate the example here.

    The third image is more of what I would like to have.
    Is there a way to make the text a constant relative amount to the PP value?
    Thank you.


    Here is my code.

    drawTextRelative(1, vS2 + 10, vSymbol, Color.RGB(128,128,255), null, Text.BOLD|Text.VCENTER, "Arial", 8, "text5a");
    drawTextRelative(1, vS2, formatPriceNumber(vS2), Color.RGB(128,128,255), null, Text.BOLD|Text.VCENTER, "Arial", 8, "text5");
    drawTextRelative(1, vS2 - 10, "S2", Color.RGB(128,128,255), null, Text.BOLD|Text.VCENTER, "Arial", 8, "text5b");
    Last edited by jethro87; 07-16-2006, 02:52 PM.

  • #2
    Zipped images to my post

    I was not able to delete my post when I realized I could not insert an image. I was not able to make an attachment when I tried to edit my post.

    So here is the zip to my post.
    Attached Files

    Comment


    • #3
      jethro87
      From what I saw you were using the wrong links.
      Go to the folder in FileShare where you are storing the images and click the Show URLs button. Then copy the URL of the image and insert that in the body of your message enclosing it with the [ IMG ] [ /IMG ] tags
      Alex

      Comment


      • #4
        Ok Alexis. Will try that.




        Aaahaa.
        Thanks Alexis for your posting help.
        Last edited by jethro87; 07-16-2006, 03:16 PM.

        Comment


        • #5
          jethro87

          Is there a way to make the text a constant relative amount to the PP value?
          At this time I don't think there is a way to do that.
          If instead of using three lines of text you used only two then it would be easy to accomplish that (see enclosed example)
          Alex

          PHP Code:
          drawTextRelative(1vS2"S2   "+vSymbolColor.RGB(128,128,255), nullText.BOLD|Text.BOTTOM"Arial"8"text5a");
          drawTextRelative(1vS2formatPriceNumber(vS2), Color.RGB(128,128,255), nullText.BOLD|Text.TOP"Arial"8"text5b"); 

          Comment


          • #6
            Yes.

            I like your suggestion very much.
            This addresses the situation nicely.

            Thanks again Alexis.

            Comment


            • #7
              jethro87
              You are most welcome
              Alex

              Comment

              Working...
              X