---
id: "T:cAlgo.API.IndicatorDataSeries"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/"
---

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

# IndicatorDataSeries (interface)

Represents a mutable array of values. An extension of DataSeries used to represent indicator values.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public interface IndicatorDataSeries
```

## Examples

C#:

```csharp
public partial class MedianPriceSma : Indicator
{
    private IndicatorDataSeries _medianPrices;
    private SimpleMovingAverage _sma;

    protected override void Initialize()
    {
        // A data series that is not an output in config.json must be created with CreateDataSeries
        _medianPrices = CreateDataSeries();
        _sma = Indicators.SimpleMovingAverage(_medianPrices, 14);
    }

    public override void Calculate(int index)
    {
        _medianPrices[index] = (Bars.HighPrices[index] + Bars.LowPrices[index]) / 2;
        Result[index] = _sma.Result[index];
    }
}
```

Python:

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

from cAlgo.API import *

class MedianPriceSma():
    def initialize(self):
        self.medianPrices = api.CreateDataSeries()
        self.sma = api.Indicators.SimpleMovingAverage(self.medianPrices, 14)

    def calculate(self, index):
        self.medianPrices[index] = (api.Bars.HighPrices[index] + api.Bars.LowPrices[index]) / 2
        api.Result[index] = self.sma.Result[index]
```

config.json:

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

## Properties

- `double Item {get; set;}` — Gets or sets the value at the specified index. [details](https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/Item/index.md)
- `IndicatorLineOutput LineOutput {get;}` — Gets the indicator line output. [details](https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/IndicatorDataSeries/LineOutput/index.md)

## Inherited members

- `double Last(int index)` (from DataSeries) [details](https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Last/index.md)
- `double LastValue {get;}` (from DataSeries) [details](https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/LastValue/index.md)
- `int Count {get;}` (from DataSeries) [details](https://help.ctrader.com/ctrader-algo/references/Collections/DataSeries/DataSeries/Count/index.md)

## Deprecated members

- `IndicatorLine Line {get;}` — Use LineOutput instead

