Skip to content

IIndicatorsAccessor.MoneyFlowIndex

method · IIndicatorsAccessor · cAlgo.API.Internals

DesktopCLICloud

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

Overloads

MoneyFlowIndex(int periods)

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

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

Parameters

Name C# type Python type Description
periods int int The period used for the calculation

Returns MoneyFlowIndex — Money Flow Index indicator instance

Examples

var moneyFlowIndex = Indicators.MoneyFlowIndex(14);
if (moneyFlowIndex.Result.LastValue > 80)
    Print("Money Flow Index is overbought: {0}", moneyFlowIndex.Result.LastValue);
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.

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

Parameters

Name C# type Python type Description
bars Bars Bars The Bars that will be used by indicator, you can pass another timeframe/symbol bars
periods int int The period used for the calculation

Returns MoneyFlowIndex — Money Flow Index indicator instance

Examples

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