---
id: "P:cAlgo.API.ChartArea.IsAutoScaleEnabled"
kind: "property"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/IsAutoScaleEnabled/"
---

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

# ChartArea.IsAutoScaleEnabled

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

## IsAutoScaleEnabled

Gets or sets the value indicating whether the auto scale is enabled for the chart area. When enabled, the Y-axis range is fitted automatically to the visible bars and outputs while the chart scrolls. Setting the Y-axis range with SetYRange, or dragging the price axis, disables the auto scale. On the main chart area the auto scale is always enabled while the price scale mode is Percent or IndexedTo100, and is always disabled while the price to bar ratio is locked; setting it to a conflicting value in these states is ignored. In the silent backtesting, the CLI and the cloud the value is only stored and has no visual effect.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
bool IsAutoScaleEnabled {get; set;}
```

Python:

```python
chartArea.IsAutoScaleEnabled: bool
```

### Returns

`bool` — 

Available since cAlgo.API 5.10.

### Examples

C#:

```csharp
Chart.SetYRange(Chart.BottomY, Chart.TopY);
Print("Auto scale after SetYRange: {0}", Chart.IsAutoScaleEnabled);

Chart.IsAutoScaleEnabled = true;
Print("Auto scale: {0}", Chart.IsAutoScaleEnabled);
```

Python:

```python
api.Chart.SetYRange(api.Chart.BottomY, api.Chart.TopY)
print(f"Auto scale after SetYRange: {api.Chart.IsAutoScaleEnabled}")

api.Chart.IsAutoScaleEnabled = True
print(f"Auto scale: {api.Chart.IsAutoScaleEnabled}")
```

