The fund flow indicator MFI bottom deviates from the stock selection formula, and the volume and price divergence is found

MFI (Money Flow Index) is an oscillator used to measure the strength and direction of capital flows. The indicator is calculated based on price and volume and fluctuates between 0 and 100. Compared with traditional oscillators such as RSI, it takes into account the intensity and direction of capital inflows and outflows and reflects the market's capital flow conditions.

The MFI indicator can be used to identify overbought or oversold signals. When the MFI indicator value exceeds 80, it enters the overbought zone, and there may be a risk of a correction or decline in the short term; when the MFI indicator value is below 20, it enters the oversold zone, and there may be a rebound or rise in the short term.

The MFI indicator can also be used to detect volume and price divergences. When there is a divergence between the MFI indicator and the stock price, it may be a sign that the price is about to reverse. For example, when the stock price hits a new high, but the MFI indicator does not hit a new high, it may indicate that the buying power of the market has weakened, and the price may fall; when the stock price hits a new low, but the MFI indicator does not hit a new low, it may mean that the market is selling. As output weakens, prices may rise.

1. Fund flow indicator MFI sub-chart indicator formula

Calculation method of MFI indicator:

1. Calculate typical price (Typical Price). A typical price is the average of the high, low and closing prices: (high + low + closing) / 3.

2. Calculate Raw Money Flow. Raw money flow is equal to typical price times volume.

3. Classify the original capital flow as "positive inflow" or "negative outflow" based on the positive or negative situation. If the typical price of the day is greater than the typical price of the previous day, it is considered a positive inflow; otherwise, it is considered a negative outflow.

4. Calculate the ratio (Money Ratio). The ratio is equal to the sum of the original capital flows in the positive direction divided by the sum of the original capital flows in the negative direction: the sum of the original capital flows in the positive direction / the sum of the original capital flows in the negative direction.

5. Convert the ratio into MFI indicator value. The MFI indicator value is equal to 100 minus (100 / (1 + Ratio)). The MFI index value calculated in this way ranges from 0 to 100.

N:=14;

TYP:=(H+L+C)/3;

RMF:=TYP*VOL;

PI:=TYP>REF(TYP,1);

MO:=TYP<REF(TYP,1);

SPI:=SUM(IF(PI,RMF,0),N);

SMO:=SUM(IF(MO,RMF,0),N);

MR:=SPI/SMO;

MFI1:=100-(100/(1+MR));

DRAWBAND(MFI,RGB(255,0,255),50,RGB(0,255,255));

DRAWBAND(20,RGB(0,0,0),80,RGB(0,0,0));

NOTEXT1:80,DOTLINE,COLORMAGENTA;

NOTEXT2:20,DOTLINE,COLORCYAN;

MFI:MFI1,COLORWHITE;

2. Fund flow indicator MFI bottom divergence from the main chart indicator formula

N:=14;

TYP:=(HIGH+LOW+CLOSE)/3;

V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),N);

MFI:=100-(100/(1+V1));

SC:=CROSS(MFI,20);

XC:=CROSS(20,MFI);

T1:=BARSLAST(SC);

T2:=BARSLAST(XC);

LL:=REF(LLV(L,T2-T1),T1);

BL:=C<LL AND MFI>20 AND T1>5 AND T2<60;

A1:=EXIST(BL,3);

A2:=(C/REF(C,1)-1)*100>3;

A3:=(C-L)/(H-L)*100>70;

A4:=H>REF(H,1);

A5:=BETWEEN(MFI,25,60);

AA:=A1 AND A2 AND A3 AND A4 AND A5;

XG:=FILTER(AA,3);

STICKLINE(XG,H,L,0,1),COLORYELLOW;

STICKLINE(XG,C,O,3,0),COLOR117777;

STICKLINE(XG,C,O,2.5,0),COLOR119999;

STICKLINE(XG,C,O,2,0),COLOR11BBBB;

STICKLINE(XG,C,O,1.5,0),COLOR11DDDD;

STICKLINE(XG,C,O,1,0),COLOR44FFFF;

DRAWICON(XG,L,11);

3. Capital flow indicator MFI bottom divergence stock selection formula

N:=14;

TYP:=(HIGH+LOW+CLOSE)/3;

V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),N);

MFI:=100-(100/(1+V1));

SC:=CROSS(MFI,20);

XC:=CROSS(20,MFI);

T1:=BARSLAST(SC);

T2:=BARSLAST(XC);

LL:=REF(LLV(L,T2-T1),T1);

BL:=C<LL AND MFI>20 AND T1>5 AND T2<60;

A1:=EXIST(BL,3);

A2:=(C/REF(C,1)-1)*100>3;

A3:=(C-L)/(H-L)*100>70;

A4:=H>REF(H,1);

A5:=BETWEEN(MFI,25,60);

AA:=A1 AND A2 AND A3 AND A4 AND A5;

XG:FILTER(AA,3);

Pay attention to Technical Pie and learn more about Tongdaxin indicator formula writing. All rights reserved, please indicate the source.

Friendly reminder: This article is only for learning and communicating technical indicator formulas and does not constitute any investment advice. Investment is risky, so be cautious when entering the market.

Guess you like

Origin blog.csdn.net/m0_74754828/article/details/133032532