M1:=100;
M2:=100;
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);
volUME:VOL,VOLSTICK;
MAVOL1:MA(VOLUME,M1),COLORFF9933,LINETHICK2;
MAVOL2:MA(VOLUME,M2),COLORFF9933,LINETHICK2;