> This page is for NinjaScript.

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

# MaxMinusMin

## Definition

The difference between the chart scale's **MaxValue** and **MinValue** represented as a y value.

## Property Value

A **double** value representing the difference in scale as a y value.

## Syntax

`\<chartscale\>.MaxMinusMin`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
   // the difference between the scales maximum and minimum value
   double   maxMinusMin = chartScale.MaxMinusMin;

   Print("maxMinusMin: " + maxMinusMin); // maxMinusMin: 3.92
}
```

In the image below, the highest calculated value on the chart scale is 2106.21, with the lowest value being 2102.29; the MaxMinusMin property therefore provides us calculated value of 3.92.

![MaxMinusMin](/_fern-img/467af7ab2bcd01b93199031bfb1da78529206bc18621c897e06360fc62b4f09d.webp)