M:=10;
M1:=2*M;M2:=4*M;M3:=8*M;
A0:=REF(H,M3)=HHV(H,2*M3+1);
B0:=FILTER(A0,M3);
C0:=BACKSET(B0,M3+1);
D0:=FILTER(C0,M3);{高点}
R01:=BACKSET(ISLASTBAR,BARSLAST(D0)+1); S01:=R01 REF(R01,1);
DRAWLINE(D0,H,S01,H,1),COLORGREEN,LINETHICK1;
A02:=REF(L,M3)=LLV(L,2*M3+1);
B02:=FILTER(A02,M3);
C02:=BACKSET(B02,M3+1);
D02:=FILTER(C02,M3);{低点}
T011:=BACKSET(ISLASTBAR,BARSLAST(D02)+1); U011:=T011 REF(T011,1);
DRAWLINE(D02,L,U011,L,1),COLORGREEN;
A1:=REF(H,M1)=HHV(H,2*M1+1);
B1:=FILTER(A1,M1);
C1:=BACKSET(B1,M1+1);
D1:=FILTER(C1,M1);{高点}
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S11:=R11 REF(R11,1);
DRAWLINE(D1,H,S11,H,1),COLORBLUE;
A2:=REF(L,M1)=LLV(L,2*M1+1);
B2:=FILTER(A2,M1);
H*0.92,DOTLINE;
BIAS(10),NODRAW;
MACD,NODRAW;
C2:=BACKSET(B2,M1+1);
D2:=FILTER(C2,M1);{低点}
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); U11:=T11 REF(T11,1);
DRAWLINE(D2,L,U11,L,1),COLORBLUE;
A12:=REF(H,M)=HHV(H,2*M+1);
B12:=FILTER(A12,M);
C12:=BACKSET(B12,M+1);
D12:=FILTER(C12,M);{高点}
R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112 REF(R112,1);
DRAWLINE(D12,H,S112,H,1),COLORRED;
A22:=REF(L,M)=LLV(L,2*M+1);
B22:=FILTER(A22,M);
C22:=BACKSET(B22,M+1);
D22:=FILTER(C22,M);{低点}
T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112 REF(T112,1);
DRAWLINE(D22,L,U112,L,1),COLORRED;
A32:=REF(H,M2)=HHV(H,2*M2+1);
B32:=FILTER(A32,M2);
C32:=BACKSET(B32,M2+1);
D32:=FILTER(C32,M2);{高点}
R312:=BACKSET(ISLASTBAR,BARSLAST(D32)+1); S312:=R312 REF(R312,1);
DRAWLINE(D32,H,S312,H,1),COLORYELLOW;
A322:=REF(L,M2)=LLV(L,2*M2+1);
B322:=FILTER(A22,M2);
C322:=BACKSET(B22,M2+1);
D322:=FILTER(C22,M2);{低点}
T312:=BACKSET(ISLASTBAR,BARSLAST(D322)+1); U312:=T312 REF(T312,1);
DRAWLINE(D322,L,U312,L,1),COLORYELLOW;
STICKLINE(C 0.905*REF(C,1),C,O,1,0),COLORGREEN;
STICKLINE(C 1.095*REF(C,1),C,O,0.1,0),COLORYELLOW;