S:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,0)))));
T:=IF(S!=0,MOD(FROMOPEN,S),0);
Vvol:=IF(CURRBARSCOUNT=1 AND PERIOD<=5 AND S!=0 AND T>0 AND FROMOPEN<240,VOL*S/T,
IF(CURRBARSCOUNT=1 AND PERIOD=6 AND (WEEKDAY!=6 OR WEEKDAY!=7),VOL*(5/WEEKDAY),VOL));
STICKLINE(CURRBARSCOUNT=1 AND PERIOD<=6 AND PERIOD>0,VVOL,0,-1,-1),COLOR00C0C0;
VOL,VOLSTICK;
A:=BArslAST(DAY!=REF(DAY,1) OR BARSCOUNT(C)=0)+1;
STICKLINE(A=1 AND PERIOD<=4,CONST(HHV(VOL,120)),0,0,-1),COLOR0000BB;
STICKLINE(A=1 AND C>O AND PERIOD<=4,CONST(HHV(VOL,120)),CONST(HHV(VOL,120))*29/30,0.5,0),COLORWHITE;
STICKLINE(A=1 AND C<=O AND PERIOD<=4,CONST(HHV(VOL,120)),CONST(HHV(VOL,120))*29/30,0.5,0),COLORGREEN;
ma5:IF(PERIOD>4,MA(VVOL,5),DRAWNULL),COLOR00FFFF;
MA10:IF(PERIOD>4,MA(VVOL,10),DRAWNULL),COLORFF00FF;
MA20:MA(VVOL,20),COLOR00FF00,DOTLINE;