[PEL] 复制代码
AA:=ref(ISDOWN,1) and ISUP and LLVBARS(l,20)<=1;
DRAWTEXT(AA,H+3*MINDIFF,'AA',COLORGREEN,0);
ALB:=VALUEWHEN(AA,LLVBARS(l,20));//在AA位置获取20周期最低点距离AA的周期跨度;返回值从0开始
AL:=VALUEWHEN(AA,llv(l,20));//AA位置最低价(未必是AA最低价)
AC:=VALUEWHEN(AA,C);
LENA:=SUMBARS(AA,1)-1;//当前位置距离最近的AA的周期跨度;返回值从0开始
AAH:=HHV(H,LENA);//AA以后,不包含AA的最高价 也不包含当前K
//至少距离AA 3个K以上,否则无法满足“收盘价连续3天在AA收盘价之上”;
BB:=LENA>=3 AND count(ALL(C>AC,3),LENA)>=1 AND ALL(L>AL,LENA) AND ISUP AND count(C>REF(AAH,1),LENA-3)=1 AND C>REF(AAH,1) AND ALB+LENA+1<=9;
CC:=LENA>=3 AND count(ALL(C>AC,3),LENA)>=1 AND ALL(L>AL,LENA) AND ISUP AND count(C>REF(AAH,1),LENA-9)=1 AND C>REF(AAH,1) AND ALB+LENA+1>10;
LENC:SUMBARS(CC,1)-1;//当前位置距离最近的CC的周期跨度;返回值从0开始
CCH:=HHV(H,LENC);//CC以后,不包含CC的最高价 也不包含当前K
DD:=ALL(C>AL,LENC) and LENC>3 AND ISUP AND count(ALL(C>VALUEWHEN(CC,C),3),LENC)>=1 AND count(C>REF(CCH,1),LENC-3)=1 AND C>REF(CCH,1) ;
DRAWTEXT(BB,H+3*MINDIFF,'BB',COLORYELLOW,0);
DRAWTEXT(CC,H+3*MINDIFF,'CC',COLORWHITE,0);
DRAWTEXT(DD,H+3*MINDIFF,'DD',COLORWHITE,0);