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

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

Properties

Time

Summary

Gets or sets the value on the Time line.

Signature

1
public abstract DateTime Time {get; set;}

Return Value

DateTime

Color

Summary

Gets or sets the line color.

Signature

1
public abstract Color Color {get; set;}

Return Value

Color

Thickness

Summary

Gets or sets the line thickness.

Signature

1
public abstract int Thickness {get; set;}

Return Value

int

Related Tutorials

LineStyle

Summary

Gets or sets the line style.

Signature

1
public abstract LineStyle LineStyle {get; set;}

Return Value

LineStyle