Indicator Line Image for Description
Author: pestocat2
Creation Date: 8/20/2018 12:37 AM
profile picture

pestocat2

#1
I have several indicators on my PricePane with various colors and Linestyles. Is there a method which I can create a small sample of the line as an image and add that image with text as the indicator description.
profile picture

Eugene

#2
Your WealthScript Strategy doesn't have much control over the indicator description. However, a combination of DrawLine (indicator line) and AnnotateBar (description) might do the trick to simulate a caption.
profile picture

pestocat2

#3
Thank you Eugene, that works just perfect.
profile picture

Eugene

#4
Gary,

Always a pleasure to help.
profile picture

pestocat2

#5
Let me take that back. The problem is that the line is not fixed to the left side and stays in a fixed position and to that stock when first drawn.
Thank you,
Gary
profile picture

Eugene

#6
Only one method can draw text (and just text - not lines, polygons or whatever) at the x, y coordinates expressed as the number of pixels from the upper left corner of the pane - it's DrawText. The workaround to the "problem" may be akin to a trick described in the Wiki FAQ:

Is there a way to see the trades on secondary symbols?

The idea here is to use a suitable font to simulate the line with characters and choose appropriate font size and formatting. I haven't tried it but it might work if you give it a try. Start charmap.exe as said here (click), browse the fonts, see the status bar for the Unicode of the matching character, then follow the way the UpTriangleGreen is defined in the code example in the Wiki.
profile picture

pestocat2

#7
I ended up with just verbal descriptions of the lines. That should work OK.
profile picture

Eugene

#8
Whatever works for you is fine with me ;)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).