Skip to content

ChartObject.ObjectType

property · ChartObject · cAlgo.API

DesktopCLICloud

Gets the chart object type.

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

ChartObjectType ObjectType {get;}
chartObject.ObjectType: ChartObjectType

Returns ChartObjectType

Examples

foreach (var chartObject in Chart.Objects)
{
    if (chartObject.ObjectType == ChartObjectType.TrendLine)
        Print("Trend line found: {0}", chartObject.Name);
}
for chartObject in api.Chart.Objects:
    if chartObject.ObjectType == ChartObjectType.TrendLine:
        api.Print(f"Trend line found: {chartObject.Name}")