---
id: "E:cAlgo.API.ChartArea.PriceScaleChanged"
kind: "event"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/PriceScaleChanged/"
---

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

# ChartArea.PriceScaleChanged

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

## PriceScaleChanged

Occurs when the price scale state of the chart area changes: the auto scale is enabled or disabled, or the price scale is reset. On the main chart area it also occurs when any chart level price scale setting changes: the price scale mode, the inversion, the price to bar ratio lock or value, the scale price chart only option or the price axis position. Not raised in the silent backtesting, the CLI and the cloud.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
event Action<ChartPriceScaleEventArgs> PriceScaleChanged;
```

Python:

```python
chartArea.PriceScaleChanged += handler  # handler(obj: ChartPriceScaleEventArgs)
```

### Returns

`Action<ChartPriceScaleEventArgs>` — 

Available since cAlgo.API 5.10.

### Examples

C#:

```csharp
Chart.PriceScaleChanged += args => Print("Price scale changed | Auto scale: {0} | Price scale mode: {1}", args.ChartArea.IsAutoScaleEnabled, args.Chart.PriceScaleMode);
```

Python:

```python
api.Chart.PriceScaleChanged += lambda args: print(f"Price scale changed | Auto scale: {args.ChartArea.IsAutoScaleEnabled} | Price scale mode: {args.Chart.PriceScaleMode}")
```

