Skip to content

ChartVerticalLine

Summary

Represents the Vertical Line chart object. The line parallel to the Y-axis that can be set on a certain time value on the X-axis.

Signature

1
public abstract interface ChartVerticalLine

Namespace

cAlgo.API

Properties

Name Description
Time { get; set; } Gets or sets the value on the Time line.
Color { get; set; } Gets or sets the line color.
Thickness { get; set; } Gets or sets the line thickness.
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
17
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to draw a vertical line on chart by using Chart.DrawVertical line method
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartVerticalLineSample : Indicator
     {
         protected override void Initialize()
         {
             var verticalLine = Chart.DrawVerticalLine("vertical_line", Chart.LastVisibleBarIndex, Color.Red, 2, LineStyle.DotsRare);
             verticalLine.IsInteractive = true;
         }
         public override void Calculate(int index)
         {
         }
     }
 }

See Also


Last update: March 23, 2023