VolumetricaCore (IChartSeries, IChartPoint, IAnnotation, IAnnGroup, IAxis), which are the same as in Deepchart. Their members are listed in Drawing interfaces.
Chart areas
An indicator whose values are not prices (a volume, a percentage) draws in an area of its own, created inOnSet:
CreateCA(isVertical, description) creates the area and keeps its reference in CA; its height is CASize, which the user can change. ChartAreaRef.Main is the price area. Vbk.GetAxisX(area) and Vbk.GetAxisY(area) give the axes of any area, including the main one, as IAxis: set their options after creating the area.
The chart is rebuilt at every load: OnSet creates the area every time, after the setDefault check.
Series
A series draws one point per bar: a line, a histogram, a marker. It is created inOnSet, right after the area:
Add one point for every bar, in
OnOpen, hidden until it has a value:
i belongs to the bar of index i. Keep this true: add a point for every bar. Then set the value where you calculate it:
Annotations
An annotation is a shape or a text placed anywhere: a level, a box, a label. Annotations are kept in groups: create a group inOnLoad, then create each annotation, set it and add it to the group. From then on it is drawn.
Line, Rectangle, Text, HorizontalLine, VerticalLine, Ellipse, Circle, Diamond, Triangle.
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 of the area.Y,Y2are prices in the main area, values of the axis in the area of the indicator.X,X2are positions on the bars: the bar of indexiis ati + 1. A bar is one unit wide, fromi + 0.5toi + 1.5.
CoordinateXType and CoordinateYType:
Which area
SetArea on the group and on every annotation: ChartAreaRef.Main for the price area, CA.Value for the area of the indicator. A group with PlotForeground = true is drawn, with everything it contains, over the bars and the other indicators.
Lines extended to the right
AHorizontalLine with IsExtended goes from X to the right edge of the chart, whatever the user scrolls:
Tooltip
The chart builds the tooltip of a bar from a line of each indicator. Answer only for your area, and returnnull when there is nothing to say: