{良友胡乱划线} n:=22; n1:=7; A1:=REF(H,N)=HHV(H,2*N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILTER(C1,N);{高点} GD1:=BARSLAST(D1); GDTS:=IF(D1,CURRBARSCOUNT,0); GDT1:=IF(GD1,REF(GDTS,GD1),GDTS); GDCS1:=CONST(GDT1); GINGBUTS1:=REF(GDT1,GD1+1); GDCS2:=CONST(GINGBUTS1); A2:=REF(L,N)=LLV(L,2*N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); D2:=FILTER(C2,N);{低点} DD1:=BARSLAST(D2); DDTS:=IF(D2,CURRBARSCOUNT,0); DDT1:=IF(DD1,REF(DDTS,DD1),DDTS); DDCS1:=CONST(DDT1); DINGBUTS1:=REF(DDT1,DD1+1); DDCS2:=CONST(DINGBUTS1); DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORFFFFFF; DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLOR00FFFF; DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=DDCS1,L,1),COLORFF00FF; DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=GDCS1,H,1),COLORFF00FF; A11:=REF(H,N1)=HHV(H,2*N1+1); B11:=FILTER(A11,N1); C11:=BACKSET(B11,N1+1); D11:=FILTER(C11,N1);{高点} GD11:=BARSLAST(D11); GDTS1:=IF(D11,CURRBARSCOUNT,0); GDT11:=IF(GD11,REF(GDTS1,GD11),GDTS1); GDCS11:=CONST(GDT11); GINGBUTS11:=REF(GDT11,GD11+1); GDCS12:=CONST(GINGBUTS11); A22:=REF(L,N1)=LLV(L,2*N1+1); B22:=FILTER(A22,N1); C22:=BACKSET(B22,N1+1); D22:=FILTER(C22,N1);{低点} DD21:=BARSLAST(D22); DDTS2:=IF(D22,CURRBARSCOUNT,0); DDT21:=IF(DD21,REF(DDTS2,DD21),DDTS2); DDCS21:=CONST(DDT21); DINGBUTS21:=REF(DDT21,DD21+1); DDCS22:=CONST(DINGBUTS21); DRAWLINE(CURRBARSCOUNT=GDCS12,H,CURRBARSCOUNT=GDCS11,H,1),COLORFFFFFF; DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS21,L,1),COLOR00FFFF; DRAWLINE(CURRBARSCOUNT=GDCS12,H,CURRBARSCOUNT=DDCS21,L,1),COLORFF00FF; DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=GDCS11,H,1),COLORFF00FF; AB:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLORRED; DRAWTEXT(CROSS(C,AB),L*0.98,'B'),COLORGRAY; {N 1 100 22 N1 1 100 7 } |
