Skip to content

ChartText.Y

property · ChartText · cAlgo.API

DesktopCLICloud

Gets or sets the Y-axis value.

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;}
chartText.Y: float

Returns double

Examples

var text = Chart.DrawText("label", "High", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);
text.Y = Bars.HighPrices.LastValue + 3 * Symbol.PipSize;
Print("Text price: {0}", text.Y);
text = api.Chart.DrawText("label", "High", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)
text.Y = api.Bars.HighPrices.LastValue + 3 * api.Symbol.PipSize
api.Print(f"Text price: {text.Y}")