Skip to content

Chart.Activated

event · Chart · cAlgo.API

DesktopCLICloud

Occurs when chart is activated

Environment behaviour

CLI — not supported. Never raised: the CLI has no chart window.

Cloud — not supported. Never raised: the cloud has no chart window.

Definition

event Action<ChartActivationChangedEventArgs> Activated;
api.Chart.Activated += handler  # handler(obj: ChartActivationChangedEventArgs)

Examples

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

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

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

See also