---
id: "T:cAlgo.API.ChartPriceScaleMode"
kind: "enum"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartPriceScaleMode/"
---

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

# ChartPriceScaleMode (enum)

Represents the price scale mode of the chart main area.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public enum ChartPriceScaleMode
```

Available since cAlgo.API 5.10.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ChartPriceScaleMode
    public partial class ChartPriceScaleModeSample : Indicator
    {
        protected override void Initialize()
        {
            Chart.PriceScaleMode = PriceScaleMode;

            Print("Price scale mode: {0} | Base price: {1}", Chart.PriceScaleMode, Chart.PriceScaleBasePrice);

            Chart.PriceScaleChanged += args => Print("Price scale mode changed to: {0}", args.Chart.PriceScaleMode);
        }

        public override void Calculate(int index)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Chart.PriceScaleMode = ChartPriceScaleMode.Percent

        print(f"Price scale mode: {api.Chart.PriceScaleMode} | Base price: {api.Chart.PriceScaleBasePrice}")

        api.Chart.PriceScaleChanged += lambda args: print(f"Price scale mode changed to: {args.Chart.PriceScaleMode}")
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true,
  "Parameters": [
    {
      "Name": "PriceScaleMode",
      "DisplayName": "Price Scale Mode",
      "Type": "Enum",
      "EnumTypeFullName": "cAlgo.API.ChartPriceScaleMode",
      "DefaultValue": "Percent"
    }
  ]
}
```

## Values

- `ChartPriceScaleMode.Regular` — The regular linear price scale. The Y axis shows prices.
- `ChartPriceScaleMode.Percent` — The percentage price scale. The Y axis shows the percentage change of the price from the base price, which is the close price of the first visible bar. Auto scale is always enabled in this mode.
- `ChartPriceScaleMode.IndexedTo100` — The indexed to 100 price scale. The Y axis shows the price as an index where the base price, the close price of the first visible bar, equals 100. Auto scale is always enabled in this mode.
- `ChartPriceScaleMode.Logarithmic` — The logarithmic price scale. Equal vertical distances represent equal percentage changes of the price. Zero and negative prices are drawn on a logarithmic scale mirrored below zero.

