OBV(资金流量)指标公式
1、OBV(资金流量)
INPUT:N(9,1,100);
TYP := (HIGH + LOW + CLOSE)/3;
rs:=SUM(IF(TYP》REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP《=REF(TYP,1),TYP*VOL,0),N);
MFI:=100-100/(1+rs);
资金流量:MFI,LINETHICK0;
a1:=SUM(IF(MFI》REF(MFI,1),VOL,IF(MFI《REF(MFI,1),-VOL,0)),0);{OBV}
RSV:=(a1-LLV(a1,34))/(HHV(a1,34)-LLV(a1,34))*100;
K:SMA(RSV,5,1);
D:SMA(K,3,1);
J:3*K-2*D;
50,colorgray,LINEDOT;
80,COLORRED,LINEDOT;
2、OBV.MACD(能量)
INPUT:N(9,1,10);
LC := REF(CLOSE,1);
a1:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100; {RSI}
DIFF:-1*(EMA(a1,26) - EMA(a1,12))/200,COLORCYAN;
DEA:-1*(EMA(DIFF,9))/200,COLORRED;
MACD:2000*(DIFF-DEA),COLORSTICK,LINETHICK2;
{柱线颜色}
s1:=MACD《REF(MACD,1)and MACD》0;
s2:=MACD《REF(MACD,1)/2 and MACD《0;
STICKLINE(MACD》=0,MACD,0,8,1),COLORRED;
STICKLINE(s1,0,MACD,8,1),COLOR00ffff;
STICKLINE(s2,0,MACD,8,0),COLORffffff;
STICKLINE(MACD》REF(MACD,1)and MACD《0,0,MACD,8,1),COLORffff00;
80,COLORMAGENTA,LINEDOT;
(股票知识网zhishi.southmoney.com)
要闻导读
|
||||||||||
|