ChartMouseEventArgs.Chart
property · ChartMouseEventArgs · cAlgo.API
DesktopCLICloud
Gets the chart.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).
Definition
public Chart Chart {get;}
chartMouseEventArgs.Chart: Chart
Returns Chart
Examples
protected override void OnStart()
{
Chart.MouseDown += OnChartMouseDown;
}
private void OnChartMouseDown(ChartMouseEventArgs args)
{
Print("Mouse down on chart {0} {1}", args.Chart.SymbolName, args.Chart.TimeFrame);
}
def on_start(self):
api.Chart.MouseDown += self.on_chart_mouse_down
def on_chart_mouse_down(self, args):
api.Print(f"Mouse down on chart {args.Chart.SymbolName} {args.Chart.TimeFrame}")