{风险资金} FMONEY:=1000; LX1:-8,DOTLINE; LX2:-4,DOTLINE; { L0:0,DOTLINE; L1:1,DOTLINE; L2:2,DOTLINE; } LX3:4,DOTLINE; LX4:8,DOTLINE; {开仓K线形态 短期} {开仓K线形态} UPL:=HHV(LOWRANGE(L),3); UP1:=(H-L)/(MIN(O,C)-L)<1.9 ; 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:=UP1 OR UP2 OR UP3;{UPL>20 AND (UP1 OR UP2 OR UP3 OR UP4),STICK;} 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:=DOWN1 OR DOWN2 OR DOWN3 ; {DOWNH>20 AND (DOWN1 OR DOWN2 OR DOWN3 OR DOWN4),STICK;} KKUP:=KUP AND COUNT(KUP,2)=1; KKDOWN:=KDOWN AND COUNT(KDOWN,2)=1; TOPW:=TOPRANGE(H),NODRAW; LOWW:=LOWRANGE(L),NODRAW; J:KDJ.J(34,8,8),NODRAW; {MAZF:CEILING(EMA((H-L),89))*2,NODRAW;} MAZF:(EMA((H-L),89))*2,NODRAW; TOPCOND:=EXIST((TOPW>2*REF(TOPW,1) AND TOPW>40) OR (C<O AND TOPW>60),2); LOWCOND:=EXIST((LOWW>2*REF(LOWW,1) AND LOWW>40) OR ( C>O AND LOWW>60),2); A1:=KKUP AND LOWCOND ,NODRAW ; A2:=KKDOWN AND TOPCOND,NODRAW; A1COUNT:COUNT(A1,BARSLAST(A2)),NODRAW; A2COUNT:COUNT(A2,BARSLAST(A1)),NODRAW; B1:=L+FLOOR((C-L)*2/3); B2:=H-CEILING((H-C)*2/3); D1:A1 AND A1COUNT=1 AND J<20,NODRAW; D2:A2 AND A2COUNT=1 AND J>80,NODRAW; J1:=J>=0 AND REF(J,1)<0; {开多} J2:=J<=100 AND REF(J,1)>100; {开空} K1:J1 AND COUNT(J1,5)=1; K2:J2 AND COUNT(J2,5)=1; F1:=A2 AND A2COUNT=2; F2:=A1 AND A1COUNT=2; {TREND LINE} M1:=A2COUNT>=2 AND KUP; M2:=A1COUNT>=2 AND KDOWN; DRAWNUMBER(D1,1,B1); DRAWNUMBER(D1,4,FLOOR(FMONEY/(MAZF*MAX(MULTIPLIER,1)))); {DRAWNUMBER(A1,-2,B1-MAZF);} DRAWNUMBER(D2,4,B2); DRAWNUMBER(D2,1,FLOOR(FMONEY/(MAZF*MAX(MULTIPLIER,1)))); {DRAWNUMBER(A2,3,B2+MAZF);} DRAWNUMBER(M1,6,A2COUNT); DRAWNUMBER(M2,-6,A1COUNT); BUY(D1 ,2); SELLSHORT(D2 ,1); { SELL(A1 AND A1COUNT=2,1); BUYSHORT(A2 AND A2COUNT=2,1); AUTOFILTER; };
标签:COUNT,DOTLINE,A1,--,DRAWNUMBER,wowkbar,通达信,NODRAW,REF From: https://www.cnblogs.com/ip99/p/17080314.html