---
id: "M:cAlgo.API.ChartArea.YToYValue(System.Double)"
kind: "method"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/YToYValue/"
---

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

# ChartArea.YToYValue

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

## YToYValue(double y)

Converts Mouse Y coordinate to area Y axis coordinate value.

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

- CLI: Always returns 0; no conversion is done.
- Cloud: Always returns 0; no conversion is done.

C#:

```csharp
double YToYValue(double y)
```

Python:

```python
chartArea.YToYValue(y: float) -> float
```

### Parameters

- `y` (`double`, Python `float`): Mouse Y coordinate

### Returns

`double` — Area Y axis coordinate value

### Examples

C#:

```csharp
var priceAtCenter = Chart.YToYValue(Chart.Height / 2);
Print("Price at the chart center: {0}", priceAtCenter);
```

Python:

```python
priceAtCenter = api.Chart.YToYValue(api.Chart.Height / 2)
api.Print(f"Price at the chart center: {priceAtCenter}")
```

