---
id: "M:cAlgo.API.Internals.IIndicatorsAccessor.Supertrend(System.Int32,System.Double)"
kind: "method"
type: "T:cAlgo.API.Internals.IIndicatorsAccessor"
url: "https://help.ctrader.com/ctrader-algo/references/Indicators/IIndicatorsAccessor/Supertrend/"
---

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

# IIndicatorsAccessor.Supertrend

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

## Supertrend(int periods, double multiplier)

Supertrend is one of the most popular trend trading indicators

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
Supertrend Supertrend(int periods, double multiplier)
```

Python:

```python
api.Indicators.Supertrend(periods: int, multiplier: float) -> Supertrend
```

### Parameters

- `periods` (`int`, Python `int`): Supertrend Period
- `multiplier` (`double`, Python `float`): Supertrend Multiplier

### Returns

`Supertrend` — Supertrend

### Examples

C#:

```csharp
var supertrend = Indicators.Supertrend(10, 3);
// UpTrend has a value while the trend is up, otherwise it is NaN
var isUpTrend = !double.IsNaN(supertrend.UpTrend.Last(1));
Print("Supertrend up trend: {0}", isUpTrend);
```

Python:

```python
import math
supertrend = api.Indicators.Supertrend(10, 3)
# UpTrend has a value while the trend is up, otherwise it is NaN
isUpTrend = not math.isnan(supertrend.UpTrend.Last(1))
api.Print(f"Supertrend up trend: {isUpTrend}")
```

