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

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

# IIndicatorsAccessor.HullMovingAverage

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

## HullMovingAverage(DataSeries source, int periods)

The Hull Moving Average is a more responsive moving average that nearly removes lag and improves smoothing at the same time.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

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

Python:

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

### Parameters

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

### Returns

`HullMovingAverage` — Hull Moving Average indicator instance

### Examples

C#:

```csharp
var hma = Indicators.HullMovingAverage(Bars.ClosePrices, 14);
var isRising = hma.Result.Last(1) > hma.Result.Last(2);
Print("HMA(14): {0}, rising: {1}", hma.Result.Last(1), isRising);
```

Python:

```python
hma = api.Indicators.HullMovingAverage(api.Bars.ClosePrices, 14)
isRising = hma.Result.Last(1) > hma.Result.Last(2)
api.Print(f"HMA(14): {hma.Result.Last(1)}, rising: {isRising}")
```

