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: 34 times

Money Flow Index (MFI)

Postby Laurent » 08 Feb 2011

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)
http://technical.traders.com/tradersonl ... sp?art=609

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: 34 times

Re: Request for MFI (Money Flow Index)

Postby Laurent » 09 Feb 2011

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

Code for the function

Code: Select all

// IMI - Intraday Momentum Index

Inputs:
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 / Denom
else
IMI = 0;

Code for the Indicator:

Code: Select all

// IMI - Intraday Momentum Index

Inputs:
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: 34 times

Re: Request for MFI (Money Flow Index)

Postby Laurent » 09 Feb 2011

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

Code: Select all

// MFI - Money Flow Index - Function

Inputs:
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 / NMF
else
MFR = 0;

MFI = 100 - 100 / (1 + MFR);

Code: Select all

// MFI - Money Flow Index Indicator

Inputs:
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");

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Request for MFI (Money Flow Index)

Postby TJ » 09 Feb 2011

For the IMI, I have coded it myself (it looks ok on a chart).
...
nice work.
thanks for sharing !


Return to “User Contributed Studies and Indicator Library”