Announcement

Collapse
No announcement yet.

Drawing Images, Shapes, and Text with EFS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Drawing Images, Shapes, and Text with EFS

    What Font names can one include in the DrawText statement, I could not find a list.

    I tried using "ArialBold" and nothing happened. I am looking to use bold fonts in the draw text

    Kiri

  • #2
    Hi,

    There is a place in the drawlinexxx() commands to specify things like italic and bold:

    drawTextRelative(0, 10, " Pu ", Color.white, Color.blue,
    Text.RELATIVETOBOTTOM | Text.BOLD, "Courier", 10,
    "P" + getCurrentBarIndex());

    Could draw in bolded courier font.
    Garth

    Comment


    • #3
      Where and how do I define the SIZE of the arrows

      mine are so dinky I cant see them, cuz I am old I guess.

      And I want a manly sized arrow too

      Comment


      • #4
        Arrows and other shapes are drawn according to the width of the bar that it's on. The wider your price bars, the larger the shape. There's no way right now to adjust them indepently of each other.

        Comment


        • #5
          Thx Dion, but I made the bars bigeer and sure enuf the arrows got bigger, but when I shrink the bars back the arrows stayed the same size, neat!!
          Attached Files

          Comment


          • #6
            What do you know, consider it a freebie =)

            Comment


            • #7
              Dion
              It looks like the size of the shapes is linked to the spacing of the bars rather than their width.
              Could they instead be based on the width (which is somewhat controlled by spacing anyhow)?
              Note for David: Have you tried offsetting the y-axis so as to make the arrows more visible?
              Alex
              Last edited by ACM; 02-14-2003, 04:02 AM.

              Comment


              • #8
                Reply to "drawImageRelative() is right aligned by default" at YahooGroups

                Wave Trader

                Just finished updating one of my efs alert files to use drawImageRelative (which took the place of setBarImage).
                I noticed that drawImageRelative() by default is aligned to the right of the bar or candle that you're drawing the image on.
                So the image is drawn over the next bar after the condition is met. Using "Image.LEFT" does not shift it to the left.
                My workaround is to use -1 (instead of 0) as my X axis, but this is a bit clumsy, even if it's well documented.
                It should really draw the image on the bar where the condition was met


                I have copied your message to this thread as I believe it is relevant.

                While I don't disagree with your conclusions you can actually shift the image to the left without using an x-axis offset.
                The image is "left aligned" by default which means that if you want to shift it to the left you need to use image.RIGHT.
                Notice in the attached image that although I am not using any offset the image is to the left of the center of the bar on which the condition is met (more or less in the same position it would be if you used -1 offset and image.LEFT).

                Irrespective even if using the -1 offset or the image.RIGHT flag the image is still not on the bar itself.
                IMO the ideal would be to add an image.CENTER flag such as the one that can be used with text. Notice in fact that all the text in the image is centered to their relative bars.

                Alex
                Attached Files

                Comment


                • #9
                  Re: Reply to "drawImageRelative() is right aligned by default" at YahooGroups

                  Originally posted by Alexis C. Montenegro

                  The image is "left aligned" by default which means that if you want to shift it to the left you need to use image.RIGHT.
                  Alex [/B]
                  Alexis,

                  I'm a little confused by your statement above. If it is "left aligned", how can you shift it to the left by using Image.RIGHT?

                  In my experience the image was always "right aligned", and Image.LEFT does not do anything, so I had to use an offset on the x-axis.

                  Can you please clarify?

                  Thanks,
                  wavetrader

                  Comment


                  • #10
                    Re: Reply to post 'Drawing Images, Shapes, and Text with EFS'

                    Wavetrader
                    By "left aligned" I mean that the left side of the image is aligned to the
                    x-axis which means that if you want to shift the image to the left ie make
                    the right side of the image aligned to the center of the axis you have to
                    use image.RIGHT.
                    Again though I agree with you that it would be best to have it exactly ON
                    the bar instead of skewed either side and I think the flag that needs to be
                    added is image.CENTER which is available for text although I have not seen
                    it documented.
                    Alex

                    Comment

                    Working...
                    X