S1:=EMA(EMA(H,5),10)*1.18;
S2:=EMA(EMA(L,5),10)*0.82;
L1:=EMA(EMA(H,5),5)*1.06;
L2:=EMA(EMA(L,5),5)*0.93;
BT11:=FILTER(L<S2,5);
BT12:=FILTER(COUNT(L<S2,3)>=2,3);
BT1:=BT11 OR BT12;
BT21:=FILTER(COUNT(L<L2,3)>=2,5);
BT22:=FILTER(COUNT(L<L2,5)>=4,3);
XG:BT21 OR BT22;