通达信OBV成交量指标公式
流通盘:=CAPITAL;DBHS:IF(CAPITAL<2000000,V/CAPITAL*100,V/流通盘*100);标准量:IF(COUNT(V>流通盘/1000,0)>0,流通盘/1000,0),COLORMAGENTA;STICKLINE(C<REF(C,1),0,vol,0.1,0),COLORGREEN;STICKLINE(C>REF(C,1),0,VOL,0.1,0),COLORRED;STICKLINE(C=REF(C,1),0,VOL,0.1,0),COLORWHITE;总量:=SUM(V,0),COLORCYAN,NODRAW;单笔更大量:HHV(V,0),COLORWHITE,DOTLINE;单笔更大换手:HHV(DBHS,240),COLORWHITE,DOTLINE;牛:=(expma(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,COLORSTICK;DRAWICON(crOSS(EXPMA(牛,120)-0.0004,EXPMA(牛,200)),单笔更大量*0.8,17);DRAWICON(CROSS(EXPMA(牛,200),EXPMA(牛,120)-0.0004),V,8);Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));DRAWICON(CROSS((C/Q2),1.03),-V/4,6);现量:VOL,VOLSTICK;STICKLINE(C<REF(C,1) AND V>REF(单笔更大量,1) AND TIME>94200,0,VOL,0.1,0),COLORGREEN;STICKLINE(C>REF(C,1) AND V>REF(单笔更大量,1) AND TIME>94200,0,VOL,0.1,0),COLORRED;STICKLINE(C=REF(C,1) AND V>REF(单笔更大量,1) AND TIME>94200,0,VOL,0.1,0),COLORWHITE;STICKLINE(V>REF(单笔更大量,1)*1.5 AND C>REF(C,1) AND DBHS>0.15 AND TIME>94500,0,VOL,0.1,0),COLORYELLOW;STICKLINE(C>REF(C,1) AND DBHS>0.22 AND TIME<94200,0,VOL,0.1,0),COLOR66FFFF,LINETHICK2;LXTP:=((V>REF(V,1) AND DBHS>=0.1 AND REF(V,1)>REF(单笔更大量,2)) OR (V>REF(单笔更大量,1) AND DBHS>=0.08 AND REF(V,2)>REF(单笔更大量,3))) AND C>REF(C,1);LXTP1:=((V>REF(V,1)*0.9 AND DBHS>=0.1 AND REF(V,1)>REF(单笔更大量,2)) OR (V>REF(单笔更大量,1)*0.9 AND DBHS>=0.1 AND REF(V,2)>REF(单笔更大量,3))) AND C>REF(C,1);DRAWTEXT(LXTP1,V*1.4,'@'),COLORYELLOW;DRAWTEXT(LXTP,V*1.1,'@'),COLORRED;XG:=LXTP,COLORYELLOW;VA:=IF(CLOSE>REF(CLOSE,1),VOL/10,-VOL/10);obv:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0),COLORYELLOW,LINETHICK2;DRAWTEXT(ISLASTBAR=1,标准量,'←标准量'),COLORMAGENTA;DRAWTEXT(ISLASTBAR=1,OBV,'←OBV'),COLORYELLOW;A1:=(VOL/CLOSE)/2;A2:=SUM(IF(A1>100 AND CLOSE>REF(CLOSE,1),A1,0),0);A3:=SUM(IF(A1>100 AND CLOSE<REF(CLOSE,1),A1,0),0);A4:=SUM(IF(A1<100 AND CLOSE>REF(CLOSE,1),A1,0),0);A5:=SUM(IF(A1<100 AND CLOSE<REF(CLOSE,1),A1,0),0);A6:=((A2+A3)+A4)+A5;量比:=SUM(VOL,0)*240/MA(V,5)/BARSCOUNT(C),NODRAW;A7:=IF((CURRBARSCOUNT=2),((100*A2)/A6),0),NODRAW;A8:=((IF((CURRBARSCOUNT=2),((100*A3)/A6),0)));A9:=((IF((CURRBARSCOUNT=2),((100*A4)/A6),0)));A10:=((IF((CURRBARSCOUNT=2),((100*A5)/A6),0)));主力买盘:=A2;主力卖盘:=A3;主力买:=CROSS(主力买盘,主力卖盘) AND 量比>0.5,NODRAW;DRAWICON(主力买,单笔更大量,34);DRAWTEXT(主力买,单笔更大量*0.9,'主力买'),COLORYELLOW;MA30:=EMA(CLOSE,30);强弱:=EMA(CLOSE,900);DRAWICON(CROSS(MA30,强弱),单笔更大量*1.1,23);