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

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

# RobotAttribute.AddIndicators

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

## AddIndicators

Gets or sets whether indicators created by robot will be added to chart or not.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public bool AddIndicators {get; set;}
```

Python:

```python
robotAttribute.AddIndicators: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
public partial class AddIndicatorsBot : Robot
{
    private SimpleMovingAverage _sma;

    protected override void OnStart()
    {
        _sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 20);
    }

    protected override void OnBarClosed()
    {
        Print("SMA: {0}", _sma.Result.Last(1));
    }
}
```

Python:

```python
def on_start(self):
    self.sma = api.Indicators.SimpleMovingAverage(api.Bars.ClosePrices, 20)

def on_bar_closed(self):
    api.Print(f"SMA: {self.sma.Result.Last(1)}")
```

config.json:

```json
{
  "AccessRights": "None",
  "AddIndicators": true
}
```

