---
id: "E:cAlgo.API.ChartArea.MouseUp"
kind: "event"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseUp/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# ChartArea.MouseUp

Member of [ChartArea](https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/index.md).

## MouseUp

Occurs when the left mouse button is released.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never raised: no chart is displayed, so there is nothing to interact with.
- Cloud: Never raised: no chart is displayed, so there is nothing to interact with.

C#:

```csharp
event Action<ChartMouseEventArgs> MouseUp;
```

Python:

```python
chartArea.MouseUp += handler  # handler(obj: ChartMouseEventArgs)
```

### Returns

`Action<ChartMouseEventArgs>` — 

### Examples

C#:

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

private void OnChartMouseUp(ChartMouseEventArgs args)
{
    Print("Mouse released at bar {0}, price {1}", args.BarIndex, args.YValue);
}
```

Python:

```python
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}")
```

