{开仓K线形态 短期} ZF:=100*(C-O)/O; {开仓K线形态} YX:=H<REF(H,1) AND L>REF(L,1); UPL:=HHV(LOWRANGE(L),4); UP1:=(H-L)/(MIN(O,C)-L)<1.9 AND C>O ; UP2:=(HHV(H,2)-LLV(L,2))/(MIN(REF(O,1),C)-LLV(L,2))<1.9; UP3:=(HHV(H,3)-LLV(L,3))/(MIN(REF(O,2),C)-LLV(L,3))<1.9; UP4:=(HHV(H,4)-LLV(L,4))/(MIN(REF(O,3),C)-LLV(L,4))<1.9; KUP:=UPL>20 AND (UP1 OR UP2 OR UP3 OR UP4); DOWNH:=HHV(TOPRANGE(H),3); DOWN1:=(H-L)/(H-MAX(O,C))<1.9; DOWN2:=(HHV(H,2)-LLV(L,2))/(HHV(H,2)-MAX(REF(O,1),C))<1.9; DOWN3:=(HHV(H,3)-LLV(L,3))/(HHV(H,3)-MAX(REF(O,2),C))<1.9; DOWN4:=(HHV(H,4)-LLV(L,4))/(HHV(H,4)-MAX(REF(O,3),C))<1.9; DOWN5:=(REF(H,1)>MAX(REF(H,2),H) AND REF(L,1)>MAX(L,REF(L,2))) OR (REF(H,1)<=REF(H,2) AND REF(L,1)>=REF(L,2) AND C<O AND C<REF(L,1)),NODRAW; KDOWN:= YX OR DOWN1 OR DOWN2 OR DOWN3 ; {DOWNH>20 AND (DOWN1 OR DOWN2 OR DOWN3 OR DOWN4),STICK;} KKUP:=KUP AND COUNT(KUP,4)=1; KKDOWN:=KDOWN AND COUNT(KDOWN,4)=1; L100:HHH,DOTLINE; L0:0,DOTLINE; LF100:-1*HHH,DOTLINE; FMONEY:=1000; MAZF:(EMA((H-L),89))*2,NODRAW; RK: 2 * ((RSI.RSI1(5,5,44) + KDJ.J(34,8,8))-100),LINETHICK2; WJ:=IF(ABS(RK)>=HHH,RK,0),NODRAW; WJK:=REF(WJ,1)<>0 AND WJ=0; {DRAWICON(WJ<>0,RK/2,3);} {底背离} BARLOW:BARSLAST(RK<=-1*HHH),NODRAW; RLOW:=BARLOW<=80 AND BARLOW>=3 AND LLV(L,BARLOW)=L AND RK>REF(RK,BARLOW); UPB:RLOW AND VXING.UP,NODRAW; DRAWICON(UPB,RK,1); {XX} XBAR:LLVBARS(L,20),NODRAW; XRLOW:RK<0 AND L>LLV(L,20) AND RK<REF(RK,XBAR) AND REF(RK,XBAR)>0,NODRAW; {顶背离} BARHIGH:=BARSLAST(RK>=HHH),NODRAW; RHIGH:=BARHIGH<=80 AND BARHIGH>=3 AND HHV(H,BARHIGH)<=H AND RK<REF(RK,BARHIGH); DOWNB:RHIGH AND VXING.DOWN,NODRAW; DRAWICON(DOWNB,RK,2); RKL:IF(XRLOW,RK,0),STICK; { DRAWICON(WJK AND KKUP ,-1*HHH,3); DRAWICON(WJK AND KKDOWN,HHH,4); ] DRAWNUMBER(WJK ,-10,CEILING(FMONEY/(MAZF*MAX(MULTIPLIER,1)))); TOPW:TOPRANGE(H),COLORBLUE,DOTLINE; LOWW:LOWRANGE(L) * -1,COLORBLUE,DOTLINE; {底部反转形态} XUP2:=ZF>3 AND REF(ZF,1)<-2 AND ZF>ABS(REF(ZF,1)) AND HHV(LOWRANGE(L),2)>100,NODRAW; XUP3:=LLV(L,3)=REF(L,1) AND LLV(H,3)=REF(H,1) AND REF(LOWRANGE(L),1)>100,NODRAW; SSUP1:VXING.UP AND EXIST(RLOW OR XRLOW,2),NODRAW; DRAWICON(SSUP1 ,RK,3);
HHH为参数,表示监视指标背离的周期,这是个震荡指标
标签:RSIKDJ,HHV,LLV,指标,通达信,NODRAW,HHH,REF,RK From: https://www.cnblogs.com/ip99/p/17077699.html