N1:=55;
N2:=8;
Z:=EMA((REF(H,1)-REF(L,1))*N1/100,2); CLOSE>REF(HHV(CLOSE,N2),1)+Z,BPK; CLOSE<REF(LLV(CLOSE,N2),1)-Z,SPK;