A1:=CLOSE>MA(CLOSE,5) AND O<MA(CLOSE,5) AND C>REF(C,1);
A2:=CLOSE>MA(CLOSE,10) AND O<MA(CLOSE,10) AND C>REF(C,1);
A3:=CLOSE>MA(CLOSE,20) AND O<MA(CLOSE,20) AND C>REF(C,1);
A4:=REF(A1,2) AND REF(A2,1) AND A3;
A5:=REF(A1,2) AND REF(A3,1) AND A2;
A6:=REF(A2,2) AND REF(A3,1) AND A1;
A7:=REF(A2,2) AND REF(A1,1) AND A3;
A8:=REF(A3,2) AND REF(A1,1) AND A2;
A9:=REF(A3,2) AND REF(A2,1) AND A1;
A10:=A4+A5+A6+A7+A8+A9;
XG:A10>0 AND V<REF(V,1);