> 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.

# MaxValue

## Definition

The highest displayed value on the chart scale.

## Property Value

A **double** value representing highest value on the chart scale as a y value.

## Syntax

`\<chartscale\>.MaxValue`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   // the maximum value of the chart scale
   double maxValue   = chartScale.MaxValue;

   Print("maxValue: " + maxValue);
}
```

In the image below, the highest value displayed as text on the y-axis reads 2106.00, however as you can see, there are a few pixels on the chart scale above this tick. The absolute rendered MaxValue on the chart scale is calculated as 2106.21.

![MaxValue](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/c6d4ca1140ba46bb640fde97624f0b19cf013c56c261dd513f50449f76dcf15d/docs/assets/developer/desktop-sdk/references/chartscale-maxvalue-maxvalue.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=20260729T070439Z&X-Amz-Expires=604800&X-Amz-Signature=e7154389d34c2ccc4da6299b4971de4358804791265d457f1beb8f04b2d4d1f4&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)