以下是通达信至简OBV指标公式(无源码的请下载附件导入)
N1:=5;N2:=13;N3:=21;
OBV:=SUM(IF(C>REF(C,1),VOL,IF(C<REF(C,1),-VOL,0)),0);
OBV1:EMA(OBV,N1),COLORGREEN;
OBV2:EMA(OBV1,N2);
OBV3:EMA(OBV2,N3),COLORCYAN;
BVC:3*OBV1-2*OBV2,COLORRED;
STICKLINE(BVC>OBV2,BVC,OBV2,0.00001,1),COLORRED;
STICKLINE(BVC<OBV2,BVC,OBV2,0.00001,1),COLORWHITE;
|