添加说明:
1、添加了地量【成交量柱体里绿色柱体显示】;
2、地量的5倍成交量【成交量柱体中间的黄柱体显示】;
3、5倍地量开始在5倍地量处向右画绿色横线【只显示最后一根】;
4、倍量【成交量柱体里的绿色或红色细柱体显示】;
5、原帖有一处笔误,在此一并更正;
源码:
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
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
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,天数);