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

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

# IIndicatorsAccessor.KaufmanAdaptiveMovingAverage

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

## KaufmanAdaptiveMovingAverage(int periods, int fastPeriods, int slowPeriods)

The Kaufman's Adaptive Moving Average (KAMA) indicator is a type of adaptive moving average designed to adjust its smoothing factor based on market volatility

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
KaufmanAdaptiveMovingAverage KaufmanAdaptiveMovingAverage(int periods, int fastPeriods, int slowPeriods)
```

Python:

```python
api.Indicators.KaufmanAdaptiveMovingAverage(periods: int, fastPeriods: int, slowPeriods: int) -> KaufmanAdaptiveMovingAverage
```

### Parameters

- `periods` (`int`, Python `int`): The periods used for the calculation. Must be an even number.
- `fastPeriods` (`int`, Python `int`): The fast moving average period
- `slowPeriods` (`int`, Python `int`): The slow moving average period

### Returns

`KaufmanAdaptiveMovingAverage` — The KAMA indicator instance.

### Examples

C#:

```csharp
var kama = Indicators.KaufmanAdaptiveMovingAverage(10, 2, 30);
Print("KAMA(10, 2, 30): {0}", kama.Result.LastValue);
```

Python:

```python
kama = api.Indicators.KaufmanAdaptiveMovingAverage(10, 2, 30)
api.Print(f"KAMA(10, 2, 30): {kama.Result.LastValue}")
```

## KaufmanAdaptiveMovingAverage(DataSeries source, int periods, int fastPeriods, int slowPeriods)

The Kaufman's Adaptive Moving Average (KAMA) indicator is a type of adaptive moving average designed to adjust its smoothing factor based on market volatility

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
KaufmanAdaptiveMovingAverage KaufmanAdaptiveMovingAverage(DataSeries source, int periods, int fastPeriods, int slowPeriods)
```

Python:

```python
api.Indicators.KaufmanAdaptiveMovingAverage(source: DataSeries, periods: int, fastPeriods: int, slowPeriods: int) -> KaufmanAdaptiveMovingAverage
```

### Parameters

- `source` (`DataSeries`, Python `DataSeries`): The source data used for calculation.
- `periods` (`int`, Python `int`): The periods used for the calculation. Must be an even number.
- `fastPeriods` (`int`, Python `int`): The fast moving average period
- `slowPeriods` (`int`, Python `int`): The slow moving average period

### Returns

`KaufmanAdaptiveMovingAverage` — The KAMA indicator instance.

### Examples

C#:

```csharp
var kama = Indicators.KaufmanAdaptiveMovingAverage(Bars.TypicalPrices, 10, 2, 30);
Print("KAMA of typical prices: {0}", kama.Result.LastValue);
```

Python:

```python
kama = api.Indicators.KaufmanAdaptiveMovingAverage(api.Bars.TypicalPrices, 10, 2, 30)
api.Print(f"KAMA of typical prices: {kama.Result.LastValue}")
```

