TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
Vvol:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0;
AT:=IF(CAPITAL=0,AMOUNT/100000000,(VOL)/CAPITAL*100);
ATM1:=EMA(AT,5);
ATM2:=MA(AT,13);
阶段地量:=AT<REF(LLV(AT,25),1) && ATM1<ATM2;
XX:=BArslAST(阶段地量);
II:=DRAWLINE(阶段地量,VOL*5,ISLASTBAR,REF(VOL*5,XX),1);
成交量:VOL,VOLSTICK;
五倍地量:IF(crOSS(COUNT(CROSS(VOL>REF(VOL*5,XX),0.5),XX)=1,0.5),V,0),NODRAW;
STICKLINE(阶段地量,V*(3/10),V*(6/10),1.38,1),COLOR009900;
STICKLINE(阶段地量,V*(3/10),V*(6/10),0.15,0),COLOR00FF00;
五倍地量线:DRAWLINE(五倍地量,II,REF(五倍地量,1),REF(II,1),1),COLORGREEN;
倍量:=V>REF(V,1)*2;
N:=BARSLAST(倍量);
常数:=CONST(IF(N=0,V,REF(V,N)));
GG:=C>O;
STICKLINE((倍量 AND GG) OR (C>REF(C,1) AND C=O AND 倍量),0,V,0,0),COLORGREEN;
阴线:=C<O;
STICKLINE((倍量 AND 阴线) OR (C<REF(C,1) AND C=O AND 倍量),0,V,0,0),COLORRED;
STICKLINE(CROSS(COUNT(CROSS(VOL>REF(VOL*5,XX),0.5),XX)=1,0.5),
V*(3/10),V*(6/10),1,0),COLORYELLOW;
备注:=REFX(CROSS(常数,V),1);
最后倍量:IF(IF(倍量,V,0)=REFX(REF(V,BARSLAST(倍量)),BARSNEXT(ISLASTBAR)),
1,0),NODRAW;
TT:=BARSLAST(备注);
TS:=IF(ISLASTBAR AND 最后倍量,REF(TT,1)+1,TT);
条件:=IF(备注,V,0)=REFX(REF(V,TS),BARSNEXT(倍量));
天:=BARSLAST(条件);
倍量横线:IF(天<=REFX(REF(BARSNEXT(最后倍量),天),最后倍量),
DRAWLINE(条件,常数,ISLASTBAR,常数,1),DRAWNULL),COLORYELLOW,DOTLINE;
天数:IF(ISLASTBAR AND 最后倍量=1,REF(天,1)+1,IF(倍量横线,天,DRAWNULL)),COLORRED,NODRAW;
DRAWNUMBER(最后倍量=1,V,天数);