AMV0:=vol*(O+C+H+L)/4;
A1:=EMA(AMV0,21)/EMA(VOL,21);
A2:=6*HHV(A1,2)-5*A1;
A3:=2*A1-A2;
A4:=A1=A3;
XD:=REF(A3>C AND A2>A3,1) AND C>O AND A4;
XG:XD;
AMV0:=vol*(O+C+H+L)/4;
A1:=EMA(AMV0,21)/EMA(VOL,21);
A2:=6*HHV(A1,2)-5*A1;
A3:=2*A1-A2;
A4:=A1=A3;
XD:=REF(A3>C AND A2>A3,1) AND C>O AND A4;
XG:XD;