V1:=PERIOD;
V2:=IF(V1=1,5,IF(V1=2,15,IF(V1=3,30,IF(V1=4,60,IF(V1=5,240,DRAWNULL)))));
V3:=MOD(FROMOPEN,V2);
V4:=IF(V3=0,V2,V3);
VVOL:IF(CURRBARSCOUNT=1,V*V2/V4,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1,VVOL,0,-1,-1),COLORFF0099;
VOLUME:VOL,VOLSTICK;