Gents,
AnnotateBar does a good job of adjusting the text position when aboveBar is true when annotating bars on the PricePane. However, AnnotateChart only has a level parameter, which when set to the High of a bar, results in text being draw starting at the high and then down. It seems that the upper left corner of the text is effectively at (bar,level).
Is there a code snippet that can adjust the AnnotateChart level parameter such that the bottom of the text appears as if AnnotateBar was used on the AnnotateChart pane parameter. Imagine there's a function AnnotateBar(ChartPane pane, string text, int bar, bool aboveBar, System.Drawing.Color color). It would provide the desired behavior.
Thanks.
~Marc
Size:
Color:
Marc,
Here is AnnotateBar2 with the
PricePane parameter (using
undocumented and unsupported code) for you:
CODE:
Please log in to see this code.
Note that a DataSeries
must be plotted in the pane you're annotating or the annotation won't be visible.
Size:
Color:
Much appreciated. I'll give it shot. Thanks.
Size:
Color:
It works well. Thanks.
Size:
Color: