1、敢死队 尖状大宝马 预涨停 超级妖选股 {敢死队3} D1:=(L+H+C*2)/4; D2:= MA(D1,4); D3:=HHV(D2,10); D4:=MA(D3,3); D5:=1.25*D4-0.25*D3; A:=IF(D5>D3,D3,D5); F1:=LLV(D2,10); F2:=MA(F1,3); F3:=1.25*F2-0.25*F1; B:=IF(F3<F1,F1,F3); MA13:=MA(C,13); DOU:=CROSS(C,B) AND CROSS(C,MA13) AND CROSS(C,A); DOUDOU:=CROSS(C,MA13) AND CROSS(C,A); 尖状大宝马:DOU OR DOUDOU,COLORDB7093;{中紫红色} STICKLINE(IF(尖状大宝马,(-120),0),1,0,0.1,0),COLORDB7093; DRAWTEXT(尖状大宝马,1.1,'★大宝马'),COLORDB7093; VAR0:=6; VAR1:=80; VAR2:=REF(CLOSE,1); VAR3:=((SMA(MAX((CLOSE - VAR2),0),18,1) / SMA(ABS((CLOSE - VAR2)),13,1)) * 100); VAR4:=((SMA(MAX((CLOSE - VAR2),0),24,1) / SMA(ABS((CLOSE - VAR2)),20,1)) * 100); VAR5:=((BARSLAST((VAR4 < 48)) <= 3) AND CROSS(VAR3,VAR4)); VAR6:=((((CLOSE - MA(CLOSE,48)) / MA(CLOSE,20)) * 100) < -12.5); VAR7:=LLV(LOW,5); VAR8:=HHV(HIGH,10); VAR9:=EMA((((CLOSE - VAR7) / (VAR8 - VAR7)) * 100),4); VAR10:=EMA(((0.667 * REF(VAR9,1)) + (0.333 * VAR9)),2); {VAR11:=1011131; VAR12:=(IF((DATE <= VAR11),VAR6,0) OR IF((DATE <= VAR11),VAR1,0));} VAR13:=REF(CLOSE,1); VAR14:=((SMA(MAX((CLOSE - VAR13),0),7,1) / SMA(ABS((CLOSE - VAR13)),7,1)) * 100); VAR15:=((SMA(MAX((CLOSE - VAR13),0),13,1) / SMA(ABS((CLOSE - VAR13)),13,1)) * 100); VAR16:=((BARSLAST((VAR15 < 43)) <= 3) AND CROSS(VAR14,VAR15)); VAR17:=((((CLOSE - MA(CLOSE,43)) / MA(CLOSE,20)) * 100) < -12.5); VAR18:=LLV(LOW,5); VAR19:=HHV(HIGH,10); VAR20:=EMA((((CLOSE - VAR18) / (VAR19 - VAR18)) * 100),4); VAR21:=EMA(((0.667 * REF(VAR20,1)) + (0.333 * VAR20)),2); {VAR22:=1011131; VAR23:=(IF((DATE <= VAR22),VAR17,0) OR IF((DATE <= VAR22),VAR1,0));} VAR24:=((((0 - (-1 * VAR16)) AND VAR17) AND CROSS(VAR20,VAR21)) AND (VAR20 <= 25)); VAR25:=REF(CLOSE,1); VAR26:=((SMA(MAX((CLOSE - VAR25),0),7,1) / SMA(ABS((CLOSE - VAR25)),7,1)) * 100); VAR27:=((SMA(MAX((CLOSE - VAR25),0),13,1) / SMA(ABS((CLOSE - VAR25)),13,1)) * 100); VAR28:=((BARSLAST((VAR27 < 33)) <= 3) AND CROSS(VAR26,VAR27)); VAR29:=((((CLOSE - MA(CLOSE,33)) / MA(CLOSE,20)) * 100) < -12.5); VAR30:=LLV(LOW,5); VAR31:=HHV(HIGH,10); VAR32:=EMA((((CLOSE - VAR30) / (VAR31 - VAR30)) * 100),4); VAR33:=EMA(((0.667 * REF(VAR32,1)) + (0.333 * VAR32)),2); {VAR34:=1011131; VAR35:=(IF((DATE <= VAR34),VAR29,0) OR IF((DATE <= VAR34),VAR1,0));} 大黑马:((((0 - (-1 * VAR28)) AND VAR29) AND CROSS(VAR32,VAR33)) AND (VAR32 <=25)),NODRAW,COLOR80FF00; STICKLINE(大黑马,0,3,3,0),COLOR80FF00; STICKLINE(大黑马,0,3,1.5,0),COLOR80FF00; STICKLINE(大黑马,0,3,0.8,0),COLOR80FF00; STICKLINE(大黑马,0,3,0.1,0),COLOR80FF00; VAR41:=REF(CLOSE,1); VAR42:=((SMA(MAX((CLOSE - VAR41),0),7,1) / SMA(ABS((CLOSE - VAR41)),7,1)) * 100); VAR43:=((SMA(MAX((CLOSE - VAR41),0),13,1) / SMA(ABS((CLOSE - VAR41)),13,1)) * 100); VAR44:=((BARSLAST((VAR43 < 23)) <= 3) AND CROSS(VAR42,VAR43)); VAR45:=((((CLOSE - MA(CLOSE,23)) / MA(CLOSE,20)) * 100) < -12.5); VAR46:=LLV(LOW,5); VAR47:=HHV(HIGH,10); VAR48:=EMA((((CLOSE - VAR46) / (VAR47 - VAR46)) * 100),4); VAR49:=EMA(((0.667 * REF(VAR48,1)) + (0.333 * VAR48)),2); {VAR50:=1011131; VAR51:=(IF((DATE <= VAR50),VAR45,0) OR IF((DATE <= VAR50),VAR1,0));} 超级大黑马:((((0 - (-1 * VAR44)) AND VAR45) AND CROSS(VAR48,VAR49)) AND (VAR48 <=25)),NODRAW,COLORRED; STICKLINE(超级大黑马,0,2,3,0),COLORRED; R1:=150*WINNER(CLOSE*0.95); GVAR3:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5); GVAR4:=(CLOSE-LLV(CLOSE,126))/(HHV(CLOSE,126)-LLV(CLOSE,126))*100; GVAR5:=EMA(CLOSE,2)-EMA(CLOSE,120); GVAR6:=EMA(GVAR5,68); GVAR7:=(GVAR5+GVAR6); 敢死:=POW(GVAR7,3)*0.1+POW(GVAR7,1); 核心:=MA(敢死,30),COLORRED,; 涨停:=1;{DYNAINFO(14)>0.096;} 警:涨停*核心/5,COLORWHITE,LINETHICK2; Y:MA(警,6),COLORRED,LINETHICK2; IF(Y<REF(Y,1),Y,DRAWNULL),COLORBLUE,LINETHICK2; Y01:警-Y,COLORBROWN; IF(警<REF(警,1),警,DRAWNULL),COLORGREEN,LINETHICK2; STICKLINE(CROSS(MA(警,1),MA(警,2)),0,警,1,0),COLORYELLOW; G:=C>=INTPART(REF(C ,1 )*1.08*100+0.5)/100; G1:=G*核心/5; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=(SMA(RSV,3,1)); D:=(SMA(K,3,1)); KK:=INTPART(SMA(RSV,3,1)); DD:=INTPART(SMA(K,3,1)); N:=KK+DD; 涨停信号:ABS((10000*(C-REF(C,1))/REF(C,1)>995)*G1),COLORGREEN; 促击:FILTER(BACKSET(涨停信号,2),2)*G1,COLORGREEN; 预涨停:IF(CROSS(N,100),ABS(警),0),COLORYELLOW; DRAWTEXT(CROSS(N,100),预涨停*1.2,'预'),COLORCYAN; DRAWTEXT(涨停信号>0,涨停信号*1.1,'停'),COLORCYAN; DRAWTEXT_FIX(ISLASTBAR,0,0,0,CODE),COLORGREEN; DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,STKNAME),COLORMAGENTA; DRAWTEXT_FIX(ISLASTBAR,0.2,0,0,HYBLOCK),COLORCYAN; DRAWTEXT_FIX(ISLASTBAR,0.3,0,0,DYBLOCK),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,GNBLOCK),COLORGREEN; {DRAWTEXT_FIX(ISLASTBAR,0.6,0.1,0,FGBLOCK),COLORWHITE;} HAN:=DATE=DATE; MA6:=MA(C,1); MA12:=MA(C,7); MA18:=MA(C,13); YY1:=O<MA6 AND C>MA6; YY2:=O<MA12 AND C>MA12; YY3:=O<MA18 AND C>MA18; YY4:=C/O>=1.02; YY5:=V>HHV(H,10); YY6:=MA6>=REF(MA6,1); YY:=YY1 AND YY2 AND YY3 AND YY4 AND YY5 AND YY6; STICKLINE(YY,1.3,3.2,2,0)*HAN,COLOR4040FF; STICKLINE(YY,1.3,2.7,3,0)*HAN,COLOR22B4EE; STICKLINE(YY,1.3,2.1,4,0)*HAN,COLORRED; X_1:=(EMA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/3; X_2:=(EMA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/3; X_3:=(EMA(CLOSE,9)+MA(CLOSE,18)+MA(CLOSE,36))/3; X_4:=(EMA(CLOSE,13)+MA(CLOSE,26)+MA(CLOSE,52))/3; X_5:=(EMA(CLOSE,18)+MA(CLOSE,36)+MA(CLOSE,72))/3; X_6:=(EMA(CLOSE,24)+MA(CLOSE,48)+MA(CLOSE,96))/3; 超级妖:(OPEN<X_1 AND OPEN<X_2 AND OPEN<X_3 AND OPEN<X_4 AND OPEN<X_5 AND OPEN<X_6 AND CLOSE>X_1 AND CLOSE>X_2 AND CLOSE>X_3 AND CLOSE>X_4 AND CLOSE>X_5 AND CLOSE>X_6)*1.01,COLORFFFF99{COLORF00FF0}; STICKLINE(超级妖,1,1.02,2,0),COLORFFFF99; 超级妖选股:DRAWTEXT(FILTER(超级妖,8),1.5,'↓★超级妖'),COLORFFFF99; {股 民 学 院 : http://www.58188.net 整理} 2、领带筹选 {公式名称: 领带筹选 画线方法: 副图} VAR1:=WINNER(CLOSE+CLOSE*15/100)*100; VAR2:=WINNER(CLOSE+CLOSE*0/100)*100; VAR3:=VAR1-VAR2; VAR4:=(WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100; VAR5:=VAR3<3 AND VAR4<0.5 AND OPEN!=LOW; VAR6:=DYNAINFO(6); VAR7:=IF(LOW>VAR6,0,IF(HIGH<VAR6,1,(VAR6-LOW+0.01)/(HIGH-LOW+0.01))); VAR8:=VOL/WINNER(LOW); VAR9:=REF(HHV(CLOSE,120),1); VAR10:=REF(LLV(CLOSE,120),1); VAR11:=100*(CLOSE-VAR10)/(VAR9-VAR10); VAR12:=VAR7>0 OR VAR7=1; VAR13:=VAR12 AND VAR8/REF(VAR8,3)>=3 AND VAR11<80; VAR14:=REF(VAR13,1) OR REF(VAR13,2) OR REF(VAR13,3) OR REF(VAR13,4); VAR15:=VAR13 AND VAR14; 机构试盘:IF(FILTER(VAR15,3) OR VAR5,10,0); {股 民 学 院 : http://www.58188.net 整理} 3、MACD背离画线,增加买卖背离和划线提示 在系统公式MACD指标的基础上,增加了背离和买卖的提示,增加了划线。 划线需要用到未来函数,但是信号不漂移。 买卖点的信号和背离信号,没有使用未来函数,信号不漂移 {MACD背离画线} SJ:=1; DIFF:(EMA(CLOSE,12)*SJ - EMA(CLOSE,26)*SJ); DEA:EMA(DIFF,9)*SJ; MACD2:(2 * (DIFF - DEA))*SJ,COLORSTICK; J:=CROSS(DIFF,DEA); S:=CROSS(DEA,DIFF); JC:=COUNT(J,BARSLAST(CROSS(DIFF>0&&DEA>0,0.5)))=1&&J; SC:=COUNT(S,BARSLAST(CROSS(0.5,DIFF>0&&DEA>0)))=1&&S; JC2:=COUNT(S,BARSLAST(CROSS(0.5,DIFF>0&&DEA>0)))=2&&S; SC2:=COUNT(J,BARSLAST(CROSS(DIFF>0&&DEA>0,0.5)))=2&&J; N1:=SUMBARS(CROSS(DEA,DIFF),1); N2:=SUMBARS(CROSS(DIFF,DEA),1); DRAWTEXT(N2=1&&N1>5&&N1<=13*SJ&&EVERY(DIFF>0&&DEA*SJ>0 ,N1)&&JC,DIFF,'多'),COLORRED,DRAWABOVE; M:=SUMBARS((DIFF<0&&CROSS(0,DEA))||(CROSS(0,DIFF)&&DEA<0),1); M1:=SUMBARS(CROSS(DIFF,DEA),1); M2:=SUMBARS(CROSS(DEA,DIFF),1); DRAWTEXT(M2=1&&M1*SJ>5&&M1<=13*SJ&&EVERY(DIFF<0&&DEA<0,N2) &&SC,DIFF,'空'),COLORGREEN,DRAWABOVE; NDTJ:=SUMBARS(N2=1&&N1>5&&N1<=13&&EVERY(DIFF>0&&DEA>0,N1),1); NKTJ:=SUMBARS(M2=1&&M1>5&&M1<=13&&EVERY(DIFF<0&&DEA<0,N2),1); DRAWTEXT(NDTJ<=4*SJ&&CROSS(DEA,DIFF) AND JC2,DIFF,'风险'),COLORRED,DRAWABOVE; DRAWTEXT(NKTJ<=4*SJ&&CROSS(DIFF,DEA) AND SC2,DIFF,'风险'),COLORGREEN,DRAWABOVE; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背离:=(REF(L,A1+1)>L OR REF(C,A1+1)>C) AND (L,DIFF)*SJ>REF((L,DIFF),A1+1) AND CROSS(DIFF,DEA); {DRAWTEXT(底背离,DEA,'底背离')COLORRED;} DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORGREEN,LINETHICK2; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 顶背离:=(REF(C,A2+1)<C*SJ OR REF(H,A2+1)<H*SJ) AND REF((H,DIFF),A2+1)>(H,DIFF) AND CROSS(DEA,DIFF); DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORRED,LINETHICK2; {DRAWTEXT(顶背离,DEA,'顶背离')COLORGREEN;} VAR6:=(2*CLOSE+HIGH+LOW)/4; VAR8:=LLV(LOW,20); VARAA:=HHV(HIGH,26); B:=EMA((VAR6-VAR8)/(VARAA-VAR8)*100,8); B1:=EMA(B,5); K22:=B>80 AND CROSS(B1,B); K1:=BARSLAST(K22); K2:=REF(K1,1); K底:=B<20 AND CROSS(B,B1); K底1:=BARSLAST(K底); K底2:=REF(K底1,1); DRAWTEXT(REF(B,1)*SJ>80 AND CROSS(B1,B) AND REF(B,1)<REF(B,K2+2) AND REF(C,1)>REF(C,K2+2),DEA,'顶背离'),COLORCYAN; DRAWTEXT(B<25*SJ AND CROSS(B,B1) AND B>REF(B,K底2) AND C<REF(C,K底2),DEA,'底背离'),COLORFF00FF; {股 民 学 院 : http://www.58188.net 整理} |