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

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

# IIndicatorsAccessor.MoneyFlowIndex

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

## MoneyFlowIndex(int periods)

The Money Flow Index measures the strength of the money flow.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
MoneyFlowIndex MoneyFlowIndex(int periods)
```

Python:

```python
api.Indicators.MoneyFlowIndex(periods: int) -> MoneyFlowIndex
```

### Parameters

- `periods` (`int`, Python `int`): The period used for the calculation

### Returns

`MoneyFlowIndex` — Money Flow Index indicator instance

### Examples

C#:

```csharp
var moneyFlowIndex = Indicators.MoneyFlowIndex(14);
if (moneyFlowIndex.Result.LastValue > 80)
    Print("Money Flow Index is overbought: {0}", moneyFlowIndex.Result.LastValue);
```

Python:

```python
moneyFlowIndex = api.Indicators.MoneyFlowIndex(14)
if moneyFlowIndex.Result.LastValue > 80:
    api.Print(f"Money Flow Index is overbought: {moneyFlowIndex.Result.LastValue}")
```

## MoneyFlowIndex(Bars bars, int periods)

The Money Flow Index measures the strength of the money flow.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
MoneyFlowIndex MoneyFlowIndex(Bars bars, int periods)
```

Python:

```python
api.Indicators.MoneyFlowIndex(bars: Bars, periods: int) -> MoneyFlowIndex
```

### Parameters

- `bars` (`Bars`, Python `Bars`): The Bars that will be used by indicator, you can pass another timeframe/symbol bars
- `periods` (`int`, Python `int`): The period used for the calculation

### Returns

`MoneyFlowIndex` — Money Flow Index indicator instance

### Examples

C#:

```csharp
var dailyBars = MarketData.GetBars(TimeFrame.Daily);
var dailyMoneyFlowIndex = Indicators.MoneyFlowIndex(dailyBars, 14);
Print("Daily Money Flow Index: {0}", dailyMoneyFlowIndex.Result.LastValue);
```

Python:

```python
dailyBars = api.MarketData.GetBars(TimeFrame.Daily)
dailyMoneyFlowIndex = api.Indicators.MoneyFlowIndex(dailyBars, 14)
api.Print(f"Daily Money Flow Index: {dailyMoneyFlowIndex.Result.LastValue}")
```

