Creating an annotation
Create it, set it, add it to a group. From then on it is drawn.Line, Rectangle, Text, HorizontalLine, VerticalLine, HorizontalRay, Ellipse, Triangle, ArrowUp, ArrowDown, Diamond.
To change an annotation later, set its properties again. To remove it, call group.RemoveAnnotation(annotation).
Coordinates
By default the coordinates are absolute: a bar and a value of the Y axis.Y,Y2are prices (or values of the area the annotation is in).X,X2are positions on the bars: the bar of indexiis ati + 1. A bar is one unit wide, fromi + 0.5toi + 1.5. A value beyond the last bar is in the future.
CoordinateXType and CoordinateYType:
Groups
Annotations are kept in groups. The indicator has two of its own:
A group holds either annotations or other groups, not both. For a few annotations, add them directly to
IndVars.Ann_List. When you have different kinds, create one group per kind:
OnLoad.