M1:=3;
{预估成交量}
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
预估成交量:IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*(TOTAL+3)/(CTIME+3),DRAWNULL),NODRAW;
STICKLINE((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),预估成交量,0,-1,-1),COLOR00C0C0;
{黑马王子量柱副图公式}
VOL,VOLSTICK;
T:=DYNAINFO(8)>0;
VO:=VOL=LLV(VOL,100) AND T;
地量柱:T AND VO,COLORBLUE;
STICKLINE(地量柱,0,V,1,0),COLORBLUE;
DRAWTEXT(地量柱,VOL+3000,'地'),COLORBLUE;
AMOV:=VOL*(OPEN+CLOSE)/2;
AMV1:SUM(AMOV,M1)/SUM(VOL,M1)COLORWHITE;
梯量柱:VOL>REF(VOL,1) AND REF(VOL,1)>REF(VOL,2) AND AMV1>REF(AMV1,1) AND C/REF(C,1)>1.01 AND CLOSE>OPEN,COLORYELLOW;
DRAWTEXT(梯量柱,VOL*0.1,'↖梯柱'),COLORYELLOW;
BLZ:=VOL>REF(V,1)*1.9;
BLZ1:=VOL
BLZ2:=VOL
倍量柱:BLZ,COLORRED; DRAWTEXT(倍量柱,VOL*0.9,'倍'),COLORYELLOW; 二倍量:=VOL>=REF(VOL,1)*3 AND VOL
STICKLINE(二倍量,0,VOL,0.1,0),COLORYELLOW; DRAWTEXT(二倍量,VOL,'二倍量'),COLORMAGENTA; 四倍量:=VOL>=REF(VOL,1)*4; STICKLINE(四倍量,0,VOL,0.1,0),COLORYELLOW; DRAWTEXT(四倍量,VOL,'四倍量以上'),COLORMAGENTA; {量能} QJJ:=V/((H-L)*2-ABS(C-O)); HSL:=IF(C!=O,QJJ*(C-O),0)/100; LNGJ:=HSL*0.5+REF(HSL,1)*0.3+REF(HSL,2)*0.2; LLJX:=EMA(LNGJ,3); B:=0,POINTDOT,COLORWHITE; B1:=SUM(LLJX,1),COLORCYAN; B2:=SUM(LLJX,2),COLORCYAN; B3:=SUM(LLJX,3),COLORCYAN; B4:=SUM(LLJX,4),COLORCYAN; B5:=SUM(LLJX,5),COLORCYAN; B6:=SUM(LLJX,6),COLORCYAN; B7:=SUM(LLJX,7),COLORCYAN; B8:=SUM(LLJX,8),COLORCYAN; B9:=SUM(LLJX,9),COLORCYAN; B10:=SUM(LLJX,10),COLORCYAN; RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; XG0:=B1 AND B2 AND B3 AND B4 AND B5 AND B6 AND B7 AND B8 AND B9 AND B10; XG1:=COUNT(CROSS(MA(C,5),MA(C,20)),3)=1; XG2:=C>PEAK(1,5,1) AND REF(C,1) XG3:=V>REF(V,1)*1.9 AND C>O AND J<90 AND K<80; XG4:=COUNT(V>REF(V,1)*1.9 AND C>REF(C,1)*1.04,3)=1 AND C
XG:=(XG0 OR XG1 OR XG2) AND XG3; HH:=HHV(B10,120); DRAWTEXT(XG AND XG0,VOL*1.15,'量能'),COLORRED; STICKLINE(XG AND XG0,0,V*2.5/3,2,0)COLORRED;