Lean  $LEAN_TAG$
QuantConnect.Indicators.MoneyFlowIndex Class Reference

The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure More...

Inheritance diagram for QuantConnect.Indicators.MoneyFlowIndex:
[legend]

Public Member Functions

override void Reset ()
 Resets this indicator to its initial state More...
 
 MoneyFlowIndex (int period)
 Initializes a new instance of the MoneyFlowIndex class More...
 
 MoneyFlowIndex (string name, int period)
 Initializes a new instance of the MoneyFlowIndex class More...
 

Public Attributes

override bool IsReady => PositiveMoneyFlow.IsReady && NegativeMoneyFlow.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (TradeBar input)
 Computes the next value of this indicator from the given state More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.TradeBarIndicator
 TradeBarIndicator (string name)
 Creates a new TradeBarIndicator with the specified name More...
 

Properties

IndicatorBase< IndicatorDataPointPositiveMoneyFlow [get]
 The sum of positive money flow to compute money flow ratio More...
 
IndicatorBase< IndicatorDataPointNegativeMoneyFlow [get]
 The sum of negative money flow to compute money flow ratio More...
 
decimal PreviousTypicalPrice [get]
 The current and previous typical price is used to determine positive or negative money flow More...
 
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

The Money Flow Index (MFI) is an oscillator that uses both price and volume to measure buying and selling pressure

Typical Price = (High + Low + Close)/3 Money Flow = Typical Price x Volume Positive Money Flow = Sum of the money flows of all days where the typical price is greater than the previous day's typical price Negative Money Flow = Sum of the money flows of all days where the typical price is less than the previous day's typical price Money Flow Ratio = (14-period Positive Money Flow)/(14-period Negative Money Flow)

Money Flow Index = 100 x Positive Money Flow / ( Positive Money Flow + Negative Money Flow)

Definition at line 34 of file MoneyFlowIndex.cs.

Constructor & Destructor Documentation

◆ MoneyFlowIndex() [1/2]

QuantConnect.Indicators.MoneyFlowIndex.MoneyFlowIndex ( int  period)

Initializes a new instance of the MoneyFlowIndex class

Parameters
periodThe period of the negative and positive money flow

Definition at line 76 of file MoneyFlowIndex.cs.

◆ MoneyFlowIndex() [2/2]

QuantConnect.Indicators.MoneyFlowIndex.MoneyFlowIndex ( string  name,
int  period 
)

Initializes a new instance of the MoneyFlowIndex class

Parameters
nameThe name of this indicator
periodThe period of the negative and positive money flow

Definition at line 86 of file MoneyFlowIndex.cs.

Member Function Documentation

◆ Reset()

override void QuantConnect.Indicators.MoneyFlowIndex.Reset ( )

Resets this indicator to its initial state

Definition at line 64 of file MoneyFlowIndex.cs.

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.MoneyFlowIndex.ComputeNextValue ( TradeBar  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 99 of file MoneyFlowIndex.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.MoneyFlowIndex.IsReady => PositiveMoneyFlow.IsReady && NegativeMoneyFlow.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 54 of file MoneyFlowIndex.cs.

Property Documentation

◆ PositiveMoneyFlow

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.MoneyFlowIndex.PositiveMoneyFlow
get

The sum of positive money flow to compute money flow ratio

Definition at line 39 of file MoneyFlowIndex.cs.

◆ NegativeMoneyFlow

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.MoneyFlowIndex.NegativeMoneyFlow
get

The sum of negative money flow to compute money flow ratio

Definition at line 44 of file MoneyFlowIndex.cs.

◆ PreviousTypicalPrice

decimal QuantConnect.Indicators.MoneyFlowIndex.PreviousTypicalPrice
get

The current and previous typical price is used to determine positive or negative money flow

Definition at line 49 of file MoneyFlowIndex.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.MoneyFlowIndex.WarmUpPeriod
get

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 59 of file MoneyFlowIndex.cs.


The documentation for this class was generated from the following file: