1、捕捉涨停个股排序 跟风捉涨停选股 捕捉涨停个股,可以做排序的通达信公式。 排序的方法: 快捷键,键盘输入 .401 即可进入排序,然后换上这个公式,就可以排序 {跟风捉涨停选股} XA_1:=IF(BARSTATUS=2,OPEN,CLOSE); XA_2:=(0.36095*XA_1-0.03309*REF(CLOSE,1)-0.04242*REF(CLOSE,2)-0.02674*REF(CLOSE,3)-0.00701*REF(CLOSE,4)-0.00265*REF(CLOSE,5)-0.00084*REF(CLOSE,6)-0.00029*REF(CLOSE,7)-0.000096*REF(CLOSE,8)-0.000032*REF(CLOSE,9)-0.000011*REF(CLOSE,10)-0.000004*REF(CLOSE,11)-0.000001*REF(CLOSE,12))/(1-0.75224); XA_3:=OPEN/REF(CLOSE,1)<1.07; XA_4:=OPEN/REF(CLOSE,1)>0 AND OPEN/REF(CLOSE,1)<1.07; XA_5:=DYNAINFO(15)/OPEN/FINANCE(46)*100; 捕风捉影:(XA_2-XA_1)/XA_1*1000>55 AND XA_4 AND XA_5>0.5; {捕捉涨停个股排序} 年涨幅以下:=200;波段涨以下:=60; X_1:=EMA(CLOSE,12)-EMA(CLOSE,26); X_2:=EMA(X_1,9); X_3:=BARSLAST(YEAR>REF(YEAR,1))+1; X_4:=IF(X_3=DRAWNULL,BARSCOUNT(CLOSE)+1,X_3); X_5:=(CLOSE/REF(CLOSE,X_4)-1)*100; X_6:=BARSLASTCOUNT(X_1>X_2); X_7:=(CLOSE/REF(CLOSE,X_6)-1)*100; X_8:=0.1; X_9:=CLOSE>=ZTPRICE(REF(CLOSE,1),X_8) AND LOW<HIGH; X_10:=CLOSE>=ZTPRICE(REF(CLOSE,1),X_8) AND LOW=HIGH; X_11:=HIGH>=ZTPRICE(REF(CLOSE,1),X_8) AND CLOSE<HIGH; X_12:=1+0.8*X_9+0.3*X_10+0.2*X_11; X_13:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100; X_14:=X_13*X_12; X_17:=0; X_18:=0; X_19:=1; X_21:=EMA(CLOSE,2)-EMA(CLOSE,89)*X_19; X_22:=EMA(X_21,30)*X_19; X_23:=2*(X_21-X_22)*10*X_19; X_24:=POW(X_23,3)*0.1+POW(X_23,2)*X_19; X_25:=IF(X_18!=1 AND X_23>0.015,X_24,0)/45*X_19; X_26:=(EMA(CLOSE,12)/EMA(CLOSE,26)-1)*1000; X_27:=(EMA(INDEXC,12)/EMA(INDEXC,26)-1)*1000; X_28:=EMA(X_26,5); X_29:=EMA(X_27,5); X_30:=X_28-REF(X_28,1); X_31:=X_29-REF(X_29,1); X_32:=IF(X_30-X_31>0 AND X_17=0,(X_30-X_31)*5,0); X_33:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); X_34:=IF(CLOSE>OPEN,X_33*(HIGH-LOW),IF(CLOSE<OPEN,X_33*(HIGH-OPEN+(CLOSE-LOW)),VOL/2)); X_35:=IF(CLOSE>OPEN,X_33*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,X_33*(HIGH-LOW),VOL/2)); X_36:=SUM((X_34-X_35)/CAPITAL,1)*1000; X_37:=VOL/10000; X_38:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1))))); X_39:=MOD(FROMOPEN,X_38); X_40:=IF(X_39<0.5,X_38,X_39); X_41:=IF(CURRBARSCOUNT=1 AND PERIOD<=5 AND DYNAINFO(8)>1,VOL*X_38/X_40/10000,DRAWNULL); X_42:=IF(CURRBARSCOUNT=1 AND PERIOD<=5,X_41,X_37); X_43:=X_42/REF(MA(X_42,5),1); X_44:=IF(X_43>=100,10,IF(X_43>=50 AND X_43<100,20,X_43/2)); X_45:=DYNAINFO(17)>0; X_46:=NOT(NAMELIKE(2) OR NAMELIKE(4) OR NAMELIKE(3)); X_47:=X_46 AND X_45 AND BARSCOUNT(CLOSE)>=30 AND X_25>REF(X_25,1); X_48:=X_5<年涨幅以下 AND X_7<波段涨以下; 日序:IF(X_47=1 AND X_17!=1 AND CLOSE>=OPEN AND X_48,X_36+X_32+X_14+X_44,0),NODRAW; 周序:IF(X_18!=1 AND CLOSE>=OPEN,SUM(日序,5),0),NODRAW; 月序:IF(X_18!=1 AND CLOSE>=OPEN,SUM(日序,20),0),NODRAW; 年涨:(CLOSE/REF(CLOSE,X_4)-1)*100,NODRAW; 波段涨幅:(CLOSE/REF(CLOSE,X_6)-1)*100,NODRAW; 2、多空红绿判势主图 多空红绿判势,其中,红绿彩带是有未来 函数的{股民学院 www.58188.com 整理} {多空红绿判势} SJ:=1; DRAWKLINE(H,O,L,C); Z1:=STRCAT(HYBLOCK,' '); Z2:=STRCAT(Z1,DYBLOCK); Z3:=STRCAT(Z2,' '); DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED; ZK1:(XMA(XMA(H,25),25)*SJ-XMA(XMA(L,25),25))*1*SJ+XMA(XMA(H,25),25)*SJ,LINETHICK1,COLORFF0000; {ZK1:(XMA(XMA(H,25),25)*SJ-XMA(XMA(L,25),25))*1*SJ+XMA(XMA(H,25),25)*SJ,DOTLINE,COLORBLUE;} ZD1:XMA(XMA(L,25),25)*SJ-(XMA(XMA(H,25),25)*SJ-XMA(XMA(L,25),25))*1*SJ,LINETHICK2,COLORRED; ZD2:EMA(ZD1,25)*SJ,COLORFF00FF,LINETHICK3; DRAWBAND(ZD1*SJ,RGB(55,0,0),ZD2*SJ,RGB(0,91,0)); DRAWKLINE(H,O,L,C); {STICKLINE(ZD1*SJ>LOW AND ZD1<HIGH,ZD1,MIN(MIN(OPEN,CLOSE),ZD1),2,0),COLORYELLOW; STICKLINE(ZD1*SJ>MIN(C,O) AND ZD1<MAX(C,O),ZD1,MIN(OPEN,CLOSE),2,0),COLORYELLOW; STICKLINE(ZD1*SJ>HIGH,OPEN,CLOSE,2,0),COLORYELLOW; STICKLINE(ZD1*SJ>HIGH,HIGH,LOW,0,0),COLORYELLOW;} {HJ:=MAX(MA(C,3),MAX(MAX(MA(C,5),MA(C,10)),MAX(MA(C,30),MA(C,60)))); HJ1:MA(HJ,5),COLORYELLOW,LINETHICK1; HJ2:MA(HJ,60),COLORYELLOW,LINETHICK2; MA1:MA(C,30),COLORGREEN,LINETHICK1; MA2:MA(C,60),COLORYELLOW,LINETHICK2;} HX:=HHV(HIGH,3); LX:=LLV(LOW,3); H1:=IF(HX<REF(HX,1)&&HX<REF(HX,2)&&HX<REF(HX,4)&&LX<REF(LX,1)&&LX<REF(LX,3)&&LX<REF(LX,5)&&OPEN>CLOSE&&(HHV(OPEN,0)-CLOSE)>0,REF(HX,4),0); L1:=IF(LX>REF(LX,1)&&LX>REF(LX,3)&&LX>REF(LX,5)&&HX>REF(HX,1)&&HX>REF(HX,2)&&HX>REF(HX,4)&&OPEN<CLOSE&&(CLOSE-LLV(OPEN,0))>0,REF(LX,4),0); H2:=VALUEWHEN(H1>0,H1); L2:=VALUEWHEN(L1>0,L1); K1:=IF(CLOSE>H2,-3,IF(CLOSE<L2,1,0)); K2:=VALUEWHEN(K1<>0,K1); G:=IF(K2=1,H2,L2); G1:=VALUEWHEN(ISLASTBAR,G); TMP:=K2; W1:=K2; W2:=OPEN-CLOSE; HT:=IF(OPEN>CLOSE,OPEN,CLOSE); LT:=IF(OPEN<CLOSE,OPEN,CLOSE); STICKLINE(W1=1,HIGH,HT,0,0),COLORCYAN; STICKLINE(W1=1,LOW,LT,0,0),COLORCYAN; STICKLINE(W1=-3,HIGH,HT,0,0),COLORRED; STICKLINE(W1=-3,LOW,LT,0,0),COLORRED; STICKLINE(W1>0,OPEN,CLOSE,3,1),COLORCYAN; STICKLINE(W1<=0,OPEN,CLOSE,3,1),COLORRED; STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,3,0),COLORRED; STICKLINE(W2>0&&W1>0,OPEN,CLOSE,3,0),COLORCYAN; 3、暴涨临界点 紫气东来 泰山绝杀公式组 小牛网的直播龙头泰山老师的公式{股民学院 www.58188.com 整理} {泰山绝杀 副图源码} {牛仔网-龙头泰山} V1:=(C*2+H+L)/4*10; V2:=EMA(V1,13)-EMA(V1,34); V3:=EMA(V2,5); V4:=2*(V2-V3)*5.5; 秘密撤: IF(V4<=0,V4,0),COLOR00FF00,LINETHICK2; 秘密进: IF(V4>=0,V4,0),COLORFF00FF,LINETHICK2; V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8; V6:=EMA(3*V5-2*SMA(V5,18,1),5); V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10; V8:=(INDEXC*2+INDEXH+INDEXL)/4; V9:=EMA(V8,13)-EMA(V8,34); VA:=EMA(V9,3); VB:=(V9-VA)/2; 猴子进: IF(VB>=0,VB,0),COLORYELLOW,LINETHICK2; 猴子撤: IF(VB<=0,VB,0),COLORBLUE,LINETHICK2; AA:=WINNER(CLOSE+CLOSE*15/100)*100; BB:=WINNER(CLOSE+CLOSE*0/100)*100; CC:=AA-BB; DD:=(WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100; EE:=CC<3 AND DD<0.5; A1:=DYNAINFO(6); A2:=IF(LOW>A1,0,IF(HIGH<A1,1,(A1-LOW+0.01)/(HIGH-LOW+0.01))); A3:=VOL/WINNER(LOW); A4:=REF(HHV(CLOSE,120),1); A5:=REF(LLV(CLOSE,120),1); A6:=100*(CLOSE-A5)/(A4-A5); A7:=A2>0 OR A2=1; A8:=A7 AND A3/REF(A3,3)>=3 AND A6<80; A9:=REF(A8,1) OR REF(A8,2) OR REF(A8,3) OR REF(A8,4); A10:=A8 AND A9; A11:=IF(FILTER(A8,3),5,0); A12:=IF(FILTER(A10,3) OR EE,10,0); 馒头进场日:IF(A11,8,0),LINETHICK0; STICKLINE(A12,0,15,5,1),COLORFF00FF; 馒头加仓日:IF(A12,88,0),LINETHICK0; STICKLINE(A12,0,15,5,1),COLORFF00FF; STICKLINE(A11,0,5,1,0),COLORFFEE00; STICKLINE(A12,0,15,1,0),COLOR1020FF; DRAWTEXT(A11,8,'猴子进场'); DRAWTEXT(A12,17,'猴子加仓'); VAR1:=REF(LOW,1); VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1)*4; VAR3:=EMA(VAR2,13); VAR4:=LLV(LOW,34); VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3); 兔子进场: STICKLINE(VAR5>REF(VAR5,1),0,VAR5,7,1 ),COLORRED; 洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN,LINETHICK2; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2,1),COLORGREEN; VAR6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1); VAR7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1); VAR8:=VAR6<REF(VAR7,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1); DRAWTEXT(VAR8 AND COUNT(VAR8,30)=1,40,'ˇ绝杀'); DRAWTEXT(CURRBARSCOUNT=129,0.5,'牛仔网龙头泰山'),COLORRED; {紫气东来} DIFF:EMA(CLOSE,9)-EMA(CLOSE,17); DEA:EMA(DIFF,8),COLORFFAA00; MACD:=2*(DIFF-DEA); STICKLINE(MACD>=0,MACD,0,4,1),COLORF00FF0; STICKLINE(MACD<0,MACD,0,4,1),COLORWHITE; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4,0 ),COLOR00AAFF; X1:IF(DIFF<0,DIFF,0),COLOR0000FF,LINETHICK1; X2:IF(DIFF<0,0,DIFF),COLORMAGENTA,LINETHICK2; X3:IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1; X4:IF(DIFF>DEA,DEA,DEA),LINETHICK1,COLORFFBB11; 低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1; STICKLINE(低位金叉,DEA*0.86,DEA*0.66,6,0),COLORYELLOW; DRAWTEXT(低位金叉,DEA*0.86,' 低位金叉'),COLORYELLOW; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,DEA*0.96,DEA*0.76,6,0),COLORFF00FF; DRAWICON(二次金叉,DEA*1.1,'BUY') ; DRAWTEXT(二次金叉,DEA*0.96,' 二次金叉'),COLORFF00FF; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); STICKLINE(底背离,DEA*1.09,DEA*0.86,6,0),COLOR00FF00; DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK1; DRAWTEXT(底背离,DEA*1.09,' 底背离'),COLOR6600FF; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK1; DRAWTEXT(顶背离,DEA*1.2,' 顶背离'),COLOR00FF00; {暴涨临界点} {参数就用均线参数} MA1:MA(CLOSE,M1); MA2:MA(CLOSE,M2); MA3:MA(CLOSE,M3); MA4:MA(CLOSE,M4); DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26); DEA:=EMA(DIF,9); AAA:=(DIF-DEA)*2*60; 起爆:=CROSS(AAA-REF(AAA,1),13),COLORRED,LINETHICK2; DRAWTEXT(起爆,L*0.99,'↖暴涨临界点'),COLORYELLOW,LINETHICK2; |