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);
CCCV:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
VVOL:=IF(CCCV>REFDATE(HHV(V,300),DATE)*1.1,REFDATE(HHV(V,300),DATE)*1.1,CCCV);
STICKLINE(CURRBARSCOUNT=1,VVOL,0,5,-1),COLORFFFFCC;