---
id: "T:cAlgo.API.ChartActivationChangedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartActivationChangedEventArgs/"
---

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

# ChartActivationChangedEventArgs (class)

Provides data for chart activated/deactivated events

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never raised in the CLI: the events that pass it never fire there (Chart.Activated, Chart.Deactivated).
- Cloud: Never raised in the cloud: the events that pass it never fire there (Chart.Activated, Chart.Deactivated).

## Definition

```csharp
public class ChartActivationChangedEventArgs
```

## Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.Activated += OnChartActivationChanged;
    Chart.Deactivated += OnChartActivationChanged;
}

private void OnChartActivationChanged(ChartActivationChangedEventArgs args)
{
    Print("Chart {0} {1} is active: {2}", args.Chart.SymbolName, args.Chart.TimeFrame, args.Chart.IsActive);
}
```

Python:

```python
def on_start(self):
    api.Chart.Activated += self.on_chart_activation_changed
    api.Chart.Deactivated += self.on_chart_activation_changed

def on_chart_activation_changed(self, args):
    api.Print(f"Chart {args.Chart.SymbolName} {args.Chart.TimeFrame} is active: {args.Chart.IsActive}")
```

## Properties

- `public Chart Chart {get;}` — The chart that event belongs to [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartActivationChangedEventArgs/Chart/index.md)

