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

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

# ChartObjectEventArgs.ChartObject

Member of [ChartObjectEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartObjectEventArgs/index.md).

## ChartObject

Gets the chart object.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public ChartObject ChartObject {get;}
```

Python:

```python
chartObjectEventArgs.ChartObject: ChartObject
```

### Returns

`ChartObject` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.DrawHorizontalLine("line", Symbol.Bid, Color.Red);
    Chart.ObjectHoverChanged += OnChartObjectHoverChanged;
}

private void OnChartObjectHoverChanged(ChartObjectHoverChangedEventArgs args)
{
    if (args.ChartObject is ChartHorizontalLine line)
        Print("Horizontal line {0} at price {1}", line.Name, line.Y);
}
```

Python:

```python
def on_start(self):
    api.Chart.DrawHorizontalLine("line", api.Symbol.Bid, Color.Red)
    api.Chart.ObjectHoverChanged += self.on_chart_object_hover_changed

def on_chart_object_hover_changed(self, args):
    if args.ChartObject.ObjectType == ChartObjectType.HorizontalLine:
        api.Print(f"Horizontal line {args.ChartObject.Name} is hovered")
```

