---
id: "M:cAlgo.API.ChartArea.ResetPriceScale"
kind: "method"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/ResetPriceScale/"
---

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

# ChartArea.ResetPriceScale

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

## ResetPriceScale()

Resets the price scale of the chart area to its default state: enables the auto scale and fits the Y-axis range to the visible bars and outputs. Does not change the price scale mode, the inversion or the price axis position. Ignored on the main chart area while the price to bar ratio is locked. Does nothing in the silent backtesting, the CLI and the cloud.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
void ResetPriceScale()
```

Python:

```python
chartArea.ResetPriceScale() -> None
```

Available since cAlgo.API 5.10.

### Examples

C#:

```csharp
Chart.SetYRange(Chart.BottomY, Chart.TopY + Symbol.PipSize * 100);

Chart.ResetPriceScale();

Print("Auto scale after reset: {0} | Bottom Y: {1} | Top Y: {2}", Chart.IsAutoScaleEnabled, Chart.BottomY, Chart.TopY);
```

Python:

```python
api.Chart.SetYRange(api.Chart.BottomY, api.Chart.TopY + api.Symbol.PipSize * 100)

api.Chart.ResetPriceScale()

print(f"Auto scale after reset: {api.Chart.IsAutoScaleEnabled} | Bottom Y: {api.Chart.BottomY} | Top Y: {api.Chart.TopY}")
```

