---
id: "P:cAlgo.API.ChartObject.ObjectType"
kind: "property"
type: "T:cAlgo.API.ChartObject"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# ChartObject.ObjectType

Member of [ChartObject](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/index.md).

## ObjectType

Gets the chart object type.

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: Created and kept with all its properties, but never drawn: the CLI displays no chart.
- Cloud: Created and kept with all its properties, but never drawn: the cloud displays no chart.

C#:

```csharp
ChartObjectType ObjectType {get;}
```

Python:

```python
chartObject.ObjectType: ChartObjectType
```

### Returns

`ChartObjectType` — 

### Examples

C#:

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

Python:

```python
for chartObject in api.Chart.Objects:
    if chartObject.ObjectType == ChartObjectType.TrendLine:
        api.Print(f"Trend line found: {chartObject.Name}")
```

