参数P可设置默认30,如果你分析短线周期,设陈5或10都可以,周期长点可以设置成50到60,看个人习惯
HV1:=REF(H,P)=HHV(H,2*P+1);
HV2:=FILTER(HV1,P);
HV3:=BACKSET(HV2,P+1);
HV4:=FILTER(HV3,P);
R11:=BACKSET(ISLASTBAR,BARSLAST(HV4)+1);
S11:=R11>REF(R11,1);
BOH:DRAWLINE(HV4,H,S11,H,1),COLORBLUE;
AA2:=REF(L,P)=LLV(L,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11>REF(T11,1);
BOL:DRAWLINE(DD2,L,U11,L,1),COLORRED;
BOV:=L<=BOL AND C>BOL;
DRAWICON(BOV,L,1);
|