MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,10);
MA3:=MA(CLOSE,20);
MA4:=MA(CLOSE,60);
MA5:=MA(CLOSE,120);
Y1:=C>MA1 AND O<MA1;
Y2:=C>MA2 AND O<MA2;
Y3:=C>MA3 AND O<MA3;
Y4:=C>MA4 AND O<MA4;
Y5:=C>MA5 AND O<MA5;
XG:Y1+Y2+Y3+Y4+Y5>=3;