OBV(资金流量)指标公式

经济理财2023-02-05 02:10:02百科知识库

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),COLOR00;

STICKLINE(s2,0,MACD,8,0),COLORff;

STICKLINE(MACD》REF(MACD,1)and MACD《0,0,MACD,8,1),COLOR00;

80,COLORMAGENTA,LINEDOT;

本文标签: 股票基金  

相关推荐

猜你喜欢

大家正在看