---
id: "P:cAlgo.API.IndicatorAttribute.ScalePrecision"
kind: "property"
type: "T:cAlgo.API.IndicatorAttribute"
url: "https://help.ctrader.com/ctrader-algo/references/Attributes/IndicatorAttribute/ScalePrecision/"
---

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

# IndicatorAttribute.ScalePrecision

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

## ScalePrecision

The price scale precision.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public int ScalePrecision {get; set;}
```

Python:

```python
indicatorAttribute.ScalePrecision: int
```

### Returns

`int` — 

### Examples

C#:

```csharp
public partial class SampleIndicator : Indicator
{
    public override void Calculate(int index)
    {
        Result[index] = Bars.ClosePrices[index] - Bars.OpenPrices[index];
    }
}
```

Python:

```python
def calculate(self, index):
    api.Result[index] = api.Bars.ClosePrices[index] - api.Bars.OpenPrices[index]
```

config.json:

```json
{
  "AccessRights": "None",
  "IsOverlay": false,
  "ScalePrecision": 5,
  "LineOutputs": [
    {
      "Name": "Result",
      "DisplayName": "Main"
    }
  ]
}
```

