Skip to content

ChartHorizontalLine

Summary

Represents the Horizontal Line chart object. Used to mark a certain value on the Y-axis throughout the whole chart.

Signature

1
public abstract interface ChartHorizontalLine

Namespace

cAlgo.API

Properties

Name Description
Y { get; set; } Gets or sets the Y-axis value of the line location.
Thickness { get; set; } Gets or sets the line thickness.
Color { get; set; } Gets or sets the line color.
LineStyle { get; set; } Gets or sets the line style.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample indicator shows how to use Chart.DrawHorizontalLine method to draw an horizontal line
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class HorizontalLineSample : Indicator
     {
         protected override void Initialize()
         {
             Chart.DrawHorizontalLine("horizontalLine", Bars.ClosePrices.LastValue, Color.Red);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: June 26, 2022

Comments