{qq:7 192-550-09}
TY:= CLOSE;
HD:= FILTER(BACKSET(FILTER(REF(TY, 10)=HHV(TY,2* 10+ 1), 10), 10+ 1), 10);
LD:= FILTER(BACKSET(FILTER(REF(TY, 10)=LLV(TY,2* 10+ 1), 10), 10+ 1), 10);
A:=REF(CLOSE,bars last(HD));
B:=REF(CLOSE,bars last(LD));
t 1:= bars last(HD)& lt; BARSLAST(LD) and not (HD);
T2:=BARSLAST(HD)>BARSLAST(LD) and not (LD);
Wave point: if (t 1, a, a), color ff 00ff, dot, line thickness 2;
STICKLINE(T 1,A,A,9,0),COLORFF00FF
Wave bottom: if (T2, b, b), color 80ff00, dots, line thickness 2;