> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# GetValueByY()

## Definition

Returns the series value on the chart scale determined by a y pixel coordinate on the chart.

## Method Return Value

A **double** value representing a series value on the chart scale. This is normally a price value, but can represent indicator plot values as well.

## Syntax

`\<chartscale\>.GetValueByY(float y)`

## Method Parameters

| Parameter | Description                                                      |
| --------- | ---------------------------------------------------------------- |
| **y**     | A float value representing a pixel coordinate on the chart scale |

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   // the price value of the pixel coordinate passed in the method
   double valueByY =   chartScale.GetValueByY(1);

   Print("valueByY: " + valueByY); //2106.19693333
}
```

In the image below, we pass a value of 1 for the y value, which tells us the pixel coordinate of 1 is located at a price of 2106.19 on the chart scale.

![getvaluebyY](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/8301ef268e5baaf96aa00a68a3fdcfe8a26fc291dd7653e6458966b12ebccf33/docs/assets/developer/desktop-sdk/references/getvaluebyy-getvaluebyy.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260729%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260729T070654Z&X-Amz-Expires=604800&X-Amz-Signature=627748d5e5dc3988654e3786dd6991737a0c180beb370da85c90c11b9bb8de66&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)