VerticalLine Class
Draws a vertical line object on a chart at a given time (DTPoint) or bar number (BNPoint). Appearance may altered and an alert set using appropriate properties. A vertical line may be used as an analytical drawing tool used to identify a point in time on a chart
The following code snippet shows how to create a vertical line based on a DateTime object. To use this in an analysis technique be sure that it is setup as described in About Drawing Objects.
myDTPoint = DTPoint.create(BarDateTime, 0); myVLine = VerticalLine.create(myDTPoint); DrawingObjects.Add(myVLine);
In this next example, the color and line style of the vertical line are changed. Note that the Color property is inherited from DrawingObject while Style is a property of VerticalLine.
myVLine.Color = elsystem.drawing.Color.Red; myVLine.Style = StyleType.solid;
Namespace: elsystem.drawingobjects