N:=50;LL:=18;LH:=20; bias:=(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100; ENTERLONG:crOSS(-LL,BIAS); EXITLONG:CROSS(BIAS,LH);