Skip to content

ChartArea.MouseUp

event · ChartArea · cAlgo.API

DesktopCLICloud

Occurs when the left mouse button is released.

Environment behaviour

CLI — not supported. Never raised: no chart is displayed, so there is nothing to interact with.

Cloud — not supported. Never raised: no chart is displayed, so there is nothing to interact with.

Definition

event Action<ChartMouseEventArgs> MouseUp;
chartArea.MouseUp += handler  # handler(obj: ChartMouseEventArgs)

Examples

protected override void OnStart()
{
    Chart.MouseUp += OnChartMouseUp;
}

private void OnChartMouseUp(ChartMouseEventArgs args)
{
    Print("Mouse released at bar {0}, price {1}", args.BarIndex, args.YValue);
}
def on_start(self):
    api.Chart.MouseUp += self.on_chart_mouse_up

def on_chart_mouse_up(self, args):
    api.Print(f"Mouse released at bar {args.BarIndex}, price {args.YValue}")