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.
Size:
Color:
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.
Size:
Color:
Thank you Eugene, that works just perfect.
Size:
Color:
Gary,
Always a pleasure to help.
Size:
Color:
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
Size:
Color:
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.
Size:
Color:
I ended up with just verbal descriptions of the lines. That should work OK.
Size:
Color:
Whatever works for you is fine with me ;)
Size:
Color: