n:=5;
TY:H;
AA:=REF(TY,N)=hhV(TY,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND TY=hhV(TY,N+1);
DRAWICON(CC,TY*1.07,10);
GG:=BARSTATUS=2 AND REF(CC,BARSLAST(CC));
HH:=BACKSET(GG,BARSLAST(CC)+1);
II:=HH>REF(HH,1);
JJ:=REF(BARSLAST(CC),1);
KK:=BACKSET(II,JJ+2);
LL:=KK>REF(KK,1);
DRAWLINE(LL,TY,II,TY,1),COLORMAGENTA;
CS:=(REF(TY,BARSLAST(II))-REF(TY,BARSLAST(LL)))/(BARSLAST(LL)-BARSLAST(II));
阻力线:=REF(TY,BARSLAST(II))+BARSLAST(II)*CS;
阻力值:阻力线,LINETHICK0;
DRAWICON(CROSS(TY,阻力线),阻力线*0.99,12);