N:=7;N1:=14;N2:=28;
TH:=MAX(H,REF(C,1));
TL:=MIN(L,REF(C,1));
TR:=TH-TL;XR:=C-TL;
XRM:=SUM(XR,N)/SUM(TR,N);XRN:=SUM(XR,N1)/SUM(TR,N1);
XRO:=SUM(XR,N2)/SUM(TR,N2);
US:=(N1*N2*XRM+N*N2*XRN+N*N1*XRO)/(N1*N2+N*N2+N*N1)*100/100;
MAUS:=EMA(US,6);
买1:cross(us>ref(us,1) and us<maus and close>open and maus<ref(maus,1),0.5) and LWINNER(10,CLOSE)<0.6;
买2:cross(COUNT(CROSS(us>ref(us,1) and us<maus and close>open and maus<ref(maus,1),0.5),5)=2,0.5);