---
id: "T:cAlgo.API.Indicators.Envelopes"
kind: "interface"
namespace: "cAlgo.API.Indicators"
url: "https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/"
---

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

# Envelopes (interface)

The Envelopes indicator is used to visualize potential trading ranges and overbought/oversold conditions.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public interface Envelopes
```

## Examples

C#:

```csharp
private Envelopes _envelopes;

protected override void OnStart()
{
    _envelopes = Indicators.Envelopes(Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1);
}

protected override void OnBar()
{
    Print("Upper: {0}, Main: {1}, Lower: {2}", _envelopes.Upper.Last(1), _envelopes.Main.Last(1), _envelopes.Lower.Last(1));
}
```

Python:

```python
def on_start(self):
    self.envelopes = api.Indicators.Envelopes(api.Bars.ClosePrices, 20, MovingAverageType.Simple, 0.1)

def on_bar(self):
    api.Print(f"Upper: {self.envelopes.Upper.Last(1)}, Main: {self.envelopes.Main.Last(1)}, Lower: {self.envelopes.Lower.Last(1)}")
```

## Properties

- `IndicatorDataSeries Lower {get;}` — The lower line of the Envelopes. [details](https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Lower/index.md)
- `IndicatorDataSeries Main {get;}` — The main line of the Envelopes. [details](https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Main/index.md)
- `IndicatorDataSeries Upper {get;}` — The upper line of the Envelopes. [details](https://help.ctrader.com/ctrader-algo/references/Indicators/Envelopes/Upper/index.md)

## Inherited members

- `ChartIndicator AddToChart()` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/AddToChart/index.md)
- `Symbol Symbol {get;}` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Symbol/index.md)
- `TimeFrame TimeFrame {get;}` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/TimeFrame/index.md)
- `Bars Bars {get;}` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Bars/index.md)

