[N,1,20,5] TR:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW)); R:=MA(TR,10); Z:=REF(HHV(HIGH,N),1); D:=REF(LLV(LOW,N),1); Z-CLOSE>=2*R,SPK; CLOSE-D>=2*R,BPK;