ChartIcon.Y
property · ChartIcon · cAlgo.API
DesktopCLICloud
Gets or sets the Y-axis value of the icon 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;}
chartIcon.Y: float
Returns double
Examples
var icon = Chart.DrawIcon("signal", ChartIconType.UpArrow, Bars.OpenTimes.LastValue, Bars.LowPrices.LastValue, Color.Green);
icon.Y = Bars.LowPrices.LastValue - 5 * Symbol.PipSize;
Print("Icon price: {0}", icon.Y);
icon = api.Chart.DrawIcon("signal", ChartIconType.UpArrow, api.Bars.OpenTimes.LastValue, api.Bars.LowPrices.LastValue, Color.Green)
icon.Y = api.Bars.LowPrices.LastValue - 5 * api.Symbol.PipSize
api.Print(f"Icon price: {icon.Y}")