EasyLanguage Object Reference

HorizontalLine Class

Draws a horizontal line on a chart at a given price. Appearance may altered and an alert set using appropriate properties. Horizontal lines are often used as an analytical drawing tool to identify support and resistance levels as well as to highlight trading ranges.

The following code snippet shows how to add a horizontal line based to a chart at the Close of the current bar. To use this in an analysis technique, be sure that it is setup as described in About Drawing Objects.

myHLine = HorizontalLine.create(Close);
DrawingObjects.Add(myHLine);

Properties from both are available and allow custom formatting (width, style, color, etc.) . In this next example, the Color property is inherited from DrawingObject .

myHLine.Color = elsystem.drawing.Color.Cyan;
myHLine.Style = StyleType.dashed3;

Namespace: elsystem.drawingobjects

[ Expand All ]
Properties
  Name Type Description
Public property Alert object References additional properties used to enable and configure alert criteria for the horizontal line. See PriceAlert and AlertConfiguration.
Public property Price double Gets or sets a double representing the Price value of 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 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(double) Initializes a new instance of the HorizontalLine class for a given Price .
Public property Create(double, int) Initializes a new instance of the HorizontalLine class for a given Price and Data source.
Inheritance Hierarchy

elsystem.Object

  elsystem.DrawingObject

    elsystem.DrawingObjects.HorizontalLine