Skip to content

ChartVerticalLine.Color

property · ChartVerticalLine · cAlgo.API

DesktopCLICloud

Gets or sets the line color.

Environment behaviour

CLI — works differently. Created and kept with all its properties, but never drawn: the CLI displays no chart.

Cloud — works differently. Created and kept with all its properties, but never drawn: the cloud displays no chart.

Definition

Color Color {get; set;}
chartVerticalLine.Color: Color

Returns Color

Examples

var line = Chart.DrawVerticalLine("sessionStart", Bars.OpenTimes.LastValue, Color.Gray);
line.Color = Color.Yellow;
Print("Vertical line color: {0}", line.Color);
line = api.Chart.DrawVerticalLine("sessionStart", api.Bars.OpenTimes.LastValue, Color.Gray)
line.Color = Color.Yellow
api.Print(f"Vertical line color: {line.Color}")