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);
VVOL:IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
STICKLINE((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
MAVOL:MA(VOLUME,1);
MAVOL1:MA(VOLUME,5);
MAVOL2:MA(VOLUME,60);
DRAWBAND(MAVOL1,RGB(160,180,80),MAVOL2,RGB(100,100,100));
DRAWBAND(MAVOL,RGB(60,180,80),MAVOL2,RGB(100,100,100));
DRAWBAND(MAVOL2,RGB(160,100,100),MAVOL2,RGB(100,100,100));