M1:=5;M2:=10;
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;
VOLUME:VOL,VOLSTICK;
ZF:(C/REF(C,1)-1)*100,NODRAW;
ZF1:REF(HHVBARS(ZF,10),1)+1,NODRAW;
VH1:REF(V,ZF1),COLORLIGREEN,DOTLINE;
CH:=V,COLORYELLOW;
A:=PEAK(CH,1,1),COLORWHITE,DOTLINE;J:=Abs(A-VH1)/A,NODRAW;VH2:PEAK(VH1,1,1),COLORLIBLUE,DOTLINE;
T1:VOL*3,NODRAW;