# Money Flow Index (MFI)

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 33 times

### Money Flow Index (MFI)

Hello everyone,

I'm looking for the MFI indicator also called Volume-Weighted RSI.
A good description can be found there:
http://stockcharts.com/help/doku.php?id ... _index_mfi

I'm also looking for the IMI (Intraday Momentum Index)

Regards,

Laurent
Last edited by Laurent on 10 Feb 2011, edited 1 time in total.

Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 33 times

### Re: Request for MFI (Money Flow Index)

For the IMI, I have coded it myself (it looks ok on a chart).

Code for the function

Code: Select all

`// IMI - Intraday Momentum IndexInputs:   Series1 ( NumericSeries ),   // Open   Series2 ( NumericSeries ),   // Close   Len ( NumericSimple );Variables:   Sum1 ( 0 ),   Sum2 ( 0 ),   Denom ( 0 );Sum1 = SummationIf(Series2 > Series1, Series2 - Series1, Len);Sum2 = SummationIf(Series2 <= Series1, Series1 - Series2, Len);Denom = Sum1 + Sum2;if Denom > 0 then   IMI = 100 * Sum1 / Denomelse   IMI = 0;`

Code for the Indicator:

Code: Select all

`// IMI - Intraday Momentum IndexInputs:   OpenPrice ( Open ),   ClosePrice ( Close ),   Length ( 14 ),   OverBought ( 70 ),   OverSold ( 30 ),   Displace ( 0 );Variables:   MyIMI ( 0 );MyIMI = IMI(OpenPrice, ClosePrice, Length);Plot1[Displace](MyIMI, "MyIMI");Plot2(OverBought, "OverBought");Plot3(OverSold, "OverSold");`

Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 33 times

### Re: Request for MFI (Money Flow Index)

For the MFI, I have also coded it (it looks also ok on a chart).

Code: Select all

`// MFI - Money Flow Index - FunctionInputs:   Series1 ( NumericSeries ),   // High   Series2 ( NumericSeries ),   // Low   Series3 ( NumericSeries ),   // Close   Series4 ( NumericSeries ),   // Volume   Len ( NumericSimple );   Variables:   TP ( 0 ),   RMF ( 0 ),   PMF ( 0 ),   NMF ( 0 ),   MFR ( 0 );   TP = (Series1 + Series2 + Series3) / 3;RMF = TP * Series4;PMF = SummationIf(TP - TP[1] > 0, RMF, Len);NMF = SummationIf(TP - TP[1] <= 0, RMF, Len);if (NMF <> 0) then   MFR = PMF / NMFelse   MFR = 0;      MFI = 100 - 100 / (1 + MFR);`

Code: Select all

`// MFI - Money Flow Index IndicatorInputs:   HighPrice ( High ),   LowPrice ( Low ),   ClosePrice ( Close ),   Vol ( Volume ),   Length ( 14 ),   OverBought ( 80 ),   OverSold ( 20 ),   Displace ( 0 );Variables:   MyMFI ( 0 );MyMFI = MFI(HighPrice, LowPrice, ClosePrice, Vol, Length);Plot1[Displace](MyMFI, "MyMFI");Plot2(OverBought, "OverBought");Plot3(OverSold, "OverSold");`

TJ
Posts: 6869
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 984 times
Been thanked: 1976 times

### Re: Request for MFI (Money Flow Index)

Laurent wrote:For the IMI, I have coded it myself (it looks ok on a chart).
...

nice work.
thanks for sharing !