---
id: "T:cAlgo.API.ChartObject"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/"
---

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

# ChartObject (interface)

Represents the chart object.

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.

## Definition

```csharp
public interface ChartObject
```

## Examples

C#:

```csharp
foreach (var chartObject in Chart.Objects)
{
    Print("Name: {0} | Type: {1} | Interactive: {2} | Locked: {3}", chartObject.Name, chartObject.ObjectType, chartObject.IsInteractive, chartObject.IsLocked);
}
```

Python:

```python
for chartObject in api.Chart.Objects:
    api.Print(f"Name: {chartObject.Name} | Type: {chartObject.ObjectType} | Interactive: {chartObject.IsInteractive} | Locked: {chartObject.IsLocked}")
```

## Properties

- `string Comment {get; set;}` — Gets or sets the comment for the chart object. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Comment/index.md)
- `bool IsAlive {get;}` — Defines if the chart object still exists on the chart. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsAlive/index.md)
- `bool IsHidden {get; set;}` — Gets or sets if object is hidden and not visible to user or not. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsHidden/index.md)
- `bool IsInteractive {get; set;}` — Defines whether the instance is interactive. The non-interactive chart objects cannot be selected, have no hover effect and cannot be searched. Available only for the current cBot or Indicator and will be removed when the cBot/Indicator stops. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsInteractive/index.md)
- `bool IsLocked {get; set;}` — Gets or sets if the object is locked or not, user can't move locked objects unless unlocked. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsLocked/index.md)
- `string Name {get;}` — Gets the chart object name - the unique identifier for the object in the current chart area. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Name/index.md)
- `ChartObjectType ObjectType {get;}` — Gets the chart object type. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/index.md)
- `int ZIndex {get; set;}` — Gets or sets the location of a chart object on the Z-axis in respect to the other chart objects. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ZIndex/index.md)

