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

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property Alert object References additional properties used to enable and configure alert criteria for the vertical line. See TimeAlert and AlertConfiguration.
Public property ExtendAcrossSubgraphs bool True to extend the vertical line across all chart subgraphs. False to not extend the vertical line across all chart subgraphs.
Public property Label object References the DrawingObjectLabel object for the line.
Public property Position double Gets or sets the position of the vertical line as a drawing object point. See DOPoint for more information.
Public property ShowDate bool True to show the date associated with the line.
Public property ShowLabels bool True to show labels associated with the line.
Public property ShowTime bool True to show the time associated with the line.
Public property Style enum Gets or sets the style of the line. See the StyleType enumerated list. Usage example: StyleType.solid
Public property TopPlacement bool True places the label at the top of the vertical line; false at the bottom.
Public property Weight enum Gets or sets the line weight from an enumerated list. See Weight for a list of values. Usage example: Weight.weight5
Methods
  Name Description
Public property Create() Initializes a new instance of the class.
Public property Create(object) Initializes a new instance of the VerticalLine class at a DTPoint (date/time).
Public property Create(object, int) Initializes a new instance of the VerticalLine class at a DTPoint (date/time) and Data source.
Public property Create(object) Initializes a new instance of the VerticalLine class at a BNPoint (bar number).
Public property Create(object, int) Initializes a new instance of the VerticalLine class at a BNPoint (bar number) and Data source.