Hi,
I drew dome trading notes on a chart using AnnotateBar. As said in the WealthScript QuickRef, "Calling AnnotateBar multiple times causes the annotations to be stacked one on top of another either above or below the bar.", but the vertical spacing between the multiple annotations for a bar is too broad. Is there a way to reduce the space using something like LineSpacing?
Size:
Color:
Hi,
If you can't find it documented in the QuickRef description and there are no properties like "LineSpacing", with good certainty such capability doesn't exist. You might experiment with the Font parameter but I don't think it would have effect.
Size:
Color:
It looks to me like either you've got some extra line feeds in your text OR there's some weird interaction with the arrow images. If you run this script below, you'll see that multiple calls of AnnotateBar() stack characters pretty well.
CODE:
Please log in to see this code.
Another thing you could try is creating a Dictionary<int, string> where you store a single string per bar number. If you have multiple strings on the same bar, you just append it to the string for that bar. A the end of the script, iterate thru the Dictionary to Annotate the bars with the store string.
Size:
Color:
Thank you guys for the info.
Cone is right. I played with the code and was able to get the correct spacing between paragraphs.
Size:
Color:
Hi Cone,
Do you have sample code of dictionary for this type of coding (<bar#, string>)? I am interested to use it.
Size:
Color:
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
Thank you Cone. Your sample code works really well.
Is there a way we can control the range of Y Axis, since part of my annotation is not shown limited by Y Axis min, max?
Size:
Color:
It's a bit tricky, but here's how you can increase (but not decrease) the MinMax of the visible chart -
Note! This routine add 10% more y-scale to the top of the most recent visible chart after clicking Go (F5). If you scroll backwards and prices are higher, then the normal auto-scaling takes effect.
CODE:
Please log in to see this code.
Size:
Color:
Thank you Cone for the useful info!
Size:
Color: