Skip to content

ChartObject.Name

property · ChartObject · cAlgo.API

DesktopCLICloud

Gets the chart object name - the unique identifier for the object in the current chart area.

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

string Name {get;}
chartObject.Name: str

Returns string

Examples

var line = Chart.DrawHorizontalLine("support", Bars.LowPrices.LastValue, Color.Green);
Print("Object name: {0}", line.Name);
var found = Chart.FindObject(line.Name);
Print("Found by name: {0}", found != null);
line = api.Chart.DrawHorizontalLine("support", api.Bars.LowPrices.LastValue, Color.Green)
api.Print(f"Object name: {line.Name}")
found = api.Chart.FindObject(line.Name)
api.Print(f"Found by name: {found is not None}")