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

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

# IIndicatorsAccessor.TripleExponentialMovingAverage

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

## TripleExponentialMovingAverage(DataSeries source, int periods)

The Triple Exponential Moving Average (TEMA) is a technical indicator that provides a smoothed representation of price data by applying three levels of exponential smoothing

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
TripleExponentialMovingAverage TripleExponentialMovingAverage(DataSeries source, int periods)
```

Python:

```python
api.Indicators.TripleExponentialMovingAverage(source: DataSeries, periods: int) -> TripleExponentialMovingAverage
```

### Parameters

- `source` (`DataSeries`, Python `DataSeries`): The source data used for calculation.
- `periods` (`int`, Python `int`): The periods used for the calculation.

### Returns

`TripleExponentialMovingAverage` — The TEMA indicator instance.

### Examples

C#:

```csharp
var tema = Indicators.TripleExponentialMovingAverage(Bars.ClosePrices, 20);
Print("TEMA(20): {0}", tema.Result.LastValue);
```

Python:

```python
tema = api.Indicators.TripleExponentialMovingAverage(api.Bars.ClosePrices, 20)
api.Print(f"TEMA(20): {tema.Result.LastValue}")
```

