ChartKeyboardEventArgs.Chart
property · ChartKeyboardEventArgs · cAlgo.API
DesktopCLICloud
The chart that the event/callback occurred
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (Chart.KeyDown).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Chart.KeyDown).
Definition
public Chart Chart {get;}
chartKeyboardEventArgs.Chart: Chart
Returns Chart
Examples
protected override void OnStart()
{
Chart.KeyDown += OnChartKeyDown;
}
private void OnChartKeyDown(ChartKeyboardEventArgs args)
{
Print("Key {0} pressed on chart {1} {2}", args.Key, args.Chart.SymbolName, args.Chart.TimeFrame);
}
def on_start(self):
api.Chart.KeyDown += self.on_chart_key_down
def on_chart_key_down(self, args):
api.Print(f"Key {args.Key} pressed on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}")