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

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

# IIndicatorsAccessor.ElderForceIndex

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

## ElderForceIndex(int periods, MovingAverageType maType)

Elder's Force Index measures the amount of power used to move the price of an asset.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
ElderForceIndex ElderForceIndex(int periods, MovingAverageType maType)
```

Python:

```python
api.Indicators.ElderForceIndex(periods: int, maType: MovingAverageType) -> ElderForceIndex
```

### Parameters

- `periods` (`int`, Python `int`): Moving Average Period
- `maType` (`MovingAverageType`, Python `MovingAverageType`): Moving Average Type

### Returns

`ElderForceIndex` — ElderForceIndex

### Examples

C#:

```csharp
var forceIndex = Indicators.ElderForceIndex(13, MovingAverageType.Exponential);
Print("Elder Force Index: {0}", forceIndex.Result.Last(1));
```

Python:

```python
forceIndex = api.Indicators.ElderForceIndex(13, MovingAverageType.Exponential)
api.Print(f"Elder Force Index: {forceIndex.Result.Last(1)}")
```

## ElderForceIndex(Bars bars, int periods, MovingAverageType maType)

Elder's Force Index measures the amount of power used to move the price of an asset.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
ElderForceIndex ElderForceIndex(Bars bars, int periods, MovingAverageType maType)
```

Python:

```python
api.Indicators.ElderForceIndex(bars: Bars, periods: int, maType: MovingAverageType) -> ElderForceIndex
```

### Parameters

- `bars` (`Bars`, Python `Bars`): The Bars that will be used by indicator, you can pass another timeframe/symbol bars
- `periods` (`int`, Python `int`): Moving Average Period
- `maType` (`MovingAverageType`, Python `MovingAverageType`): Moving Average Type

### Returns

`ElderForceIndex` — ElderForceIndex

### Examples

C#:

```csharp
var dailyBars = MarketData.GetBars(TimeFrame.Daily);
var dailyForceIndex = Indicators.ElderForceIndex(dailyBars, 13, MovingAverageType.Exponential);
Print("Daily Elder Force Index: {0}", dailyForceIndex.Result.Last(1));
```

Python:

```python
dailyBars = api.MarketData.GetBars(TimeFrame.Daily)
dailyForceIndex = api.Indicators.ElderForceIndex(dailyBars, 13, MovingAverageType.Exponential)
api.Print(f"Daily Elder Force Index: {dailyForceIndex.Result.Last(1)}")
```

