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

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

# LevelsAttribute.Levels

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

## Levels

The array of price values that are ploted as level lines

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public double[] Levels {get; set;}
```

Python:

```python
levelsAttribute.Levels: list[float]
```

### Returns

`double[]` — 

### Examples

C#:

```csharp
public partial class StochasticLevelsSample : Indicator
{
    private StochasticOscillator _stochastic;

    protected override void Initialize()
    {
        _stochastic = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple);
    }

    public override void Calculate(int index)
    {
        Result[index] = _stochastic.PercentK[index];
    }
}
```

Python:

```python
class StochasticLevelsSample():
    def initialize(self):
        self.stochastic = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple)

    def calculate(self, index):
        api.Result[index] = self.stochastic.PercentK[index]
```

config.json:

```json
{
  "AccessRights": "None",
  "IsOverlay": false,
  "LineOutputs": [
    {
      "Name": "Result",
      "DisplayName": "Main"
    }
  ],
  "Levels": [
    20.0,
    50.0,
    80.5
  ]
}
```

