ChartHorizontalLine.Y
property · ChartHorizontalLine · cAlgo.API
DesktopCLICloud
Gets or sets the Y-axis value of the line location.
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
double Y {get; set;}
chartHorizontalLine.Y: float
Returns double
Examples
var line = Chart.DrawHorizontalLine("support", Bars.LowPrices.LastValue, Color.Green);
line.Y = Bars.LowPrices.Last(10);
Print("Support line price: {0}", line.Y);
line = api.Chart.DrawHorizontalLine("support", api.Bars.LowPrices.LastValue, Color.Green)
line.Y = api.Bars.LowPrices.Last(10)
api.Print(f"Support line price: {line.Y}")