{参数TS:2,999,10 {10这个值可以自己调,比如,5,10,20,...}
{极点H}
A1:=REF(H,TS)=HHV(H,2*TS+1); B1:=FILTER(A1,TS);
C1:=BACKSET(B1,TS+1); HD:=FILTER(C1,TS);
波峰: REF(H,BARSLAST(HD)),POINTDOT,COLOR990099;
{极点L}
AL1:=REF(L,TS)=LLV(L,2*TS+1); BL1:=FILTER(AL1,TS);
CL1:=BACKSET(BL1,TS+1); LD:=FILTER(CL1,TS);
波谷: REF(L,BARSLAST(LD)),POINTDOT,COLOR009900;
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD);
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
STICKLINE(T1,波峰,波峰,5,0),COLOR990099;
STICKLINE(T2,波谷,波谷,5,0),COLOR009900;
V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);
STICKLINE(V2V,O,C,-1,0),COLORYELLOW; |