N:=12;B:(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;M:=INTPART(2*N/4);A1:=REF(B,M)=HHV(B,2*M+1);B1:=FILTER(A1,M);C1:=BACKSET(B1,M+1);D1:=FILTER(C1,M);R3:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S1:=R3>REF(R3,1);DRAWLINE(D1,B,S1,B,1),COLORRED;M1:=INTPART(3*N/7);A120:=REF(B,M1)=HHV(B,2*M1+1);B120:=FILTER(A120,M1);C321:=BACKSET(B120,M1+1);D119:=FILTER(C321,M1);R1:=BACKSET(ISLASTBAR,BARSLAST(D119)+1); S10:=R1>REF(R1,1);DRAWLINE(D119,B,S10,B,1),COLORYELLOW;M2:=INTPART(1*N/10);A2:=REF(B,M2)=HHV(B,2*M2+1);B2:=FILTE