---
id: "P:cAlgo.API.ChartMouseEventArgs.MouseY"
kind: "property"
type: "T:cAlgo.API.ChartMouseEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartMouseEventArgs/MouseY/"
---

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

# ChartMouseEventArgs.MouseY

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

## MouseY

Gets the Y-axis value of the mouse event.

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

- CLI: Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).
- Cloud: Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).

C#:

```csharp
public double MouseY {get;}
```

Python:

```python
chartMouseEventArgs.MouseY: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.MouseMove += OnChartMouseMove;
}

private void OnChartMouseMove(ChartMouseEventArgs args)
{
    Chart.DrawStaticText("mouseY", "Mouse Y: " + args.MouseY, VerticalAlignment.Top, HorizontalAlignment.Left, Color.White);
}
```

Python:

```python
def on_start(self):
    api.Chart.MouseMove += self.on_chart_mouse_move

def on_chart_mouse_move(self, args):
    api.Chart.DrawStaticText("mouseY", f"Mouse Y: {args.MouseY}", VerticalAlignment.Top, HorizontalAlignment.Left, Color.White)
```

