Skip to content

ChartActivationChangedEventArgs.Chart

property · ChartActivationChangedEventArgs · cAlgo.API

DesktopCLICloud

The chart that event belongs to

Environment behaviour

CLI — not supported. Never raised in the CLI: the events that pass it never fire there (Chart.Activated, Chart.Deactivated).

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

Definition

public Chart Chart {get;}
chartActivationChangedEventArgs.Chart: Chart

Returns Chart

Examples

protected override void OnStart()
{
    Chart.Activated += OnChartActivated;
}

private void OnChartActivated(ChartActivationChangedEventArgs args)
{
    Print("Activated chart: {0} {1}", args.Chart.SymbolName, args.Chart.TimeFrame);
}
def on_start(self):
    api.Chart.Activated += self.on_chart_activated

def on_chart_activated(self, args):
    api.Print(f"Activated chart: {args.Chart.SymbolName} {args.Chart.TimeFrame}")