> 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 maximum value used for the automatic scaling of the y axis. This property will only be used when the chart object is set to \[isautoscale].

## Property Value

A **double** value.

## Syntax

`MaxValue`

## Examples

```csharp

public override void OnCalculateMinMax()
{
    if (DrawingState != DrawingState.Building)
    {
        //set the maximum value to the chart anchors price
        MaxValue = Anchor.Price;
    }
}
```