1、通达信精准选股公式:条件选股公式源码:年认同价:=MA(C,240);价格中枢:=(SUM(年认同价,0)/(BARSSINCE(年认同价0)+239);箱顶:=价格中枢*1.2;箱底:=价格中枢*0.8;毛利润率:=FINANCE(21)/FINANCE(20);成长价值:=年认同价*(1+毛利润率);收益价值:=年认同价+FINANCE(33);回调认同:=EMA(EXPMA(C,20),13);多头:=(回调认同REF(回调认同,1)AND(成长价值REF(成长价值,1)AND(收益价值REF(收益价值,1)AND(DYNAINFO(7)0);回调条件:=COUNT(C=3;回调突破:=
2、(REF(C,1)回调认同)AND(回调条件)AND 多头;成长条件:=COUNT(C=3;成长突破:=(REF(C,1)成长价值)AND(成长条件)AND 多头;收益条件:=COUNT(C=3;收益突破:=(REF(C,1)收益价值)AND(收益条件)AND 多头;箱底条件:=COUNT(C=3;箱底突破:=(REF(C,1)箱底)AND(箱底条件)AND 多头;价格条件:=COUNT(C=3;价格突破:=(REF(C,1)价格中枢)AND(价格条件)AND 多头;箱顶条件:=COUNT(C=3;箱顶突破:=(REF(C,1)箱顶)AND(箱顶条件)AND 多头;突破买点:(回调突破+成长突
3、破+收益突破+箱底突破+价格突破+箱顶突破); 专买老鼠仓老鼠仓AA1:=AMOUNT/V; BB1:=L1.2; DD1:=LMA(C,5)*0.921; EE1:=VMA(V,5)*1.5; FF1:=BB1 AND CC1 AND DD1 AND EE1; DRAWTEXT(FF1,(LOW* 0.97),老鼠仓),COLOR4080FF; 老鼠仓是个很不错的指标,信号发出一般都在一个波段的底部起涨之时。 根据本人的实践,使用指标时候要注意几点: 1 该指标可以添加到任何一个主图里面去,比如MA均线什么的。 2 出现信号当天买进股票,第二天收阳继续持股,直到出阴为止。 3 第二天出阴考虑
4、卖出,非常适合短线操作! 老鼠仓(选股公式) AA1:=AMOUNT/V; BB1:=L1.2; DD1:=LMA(C,5)*0.921; EE1:=V=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=REF(C,3) AND REF(C,2)=REF(C,1);VAR4:=VAR1REF(VAR1,1) AND REF(VAR1,1)REF(VAR1,2);VAR5:=LOWHHV(VAR1,13) AND CLOSEREF(C,1) AND CLOSEOPEN;VAR6:=VAR5 AND COUNT(VAR4,2);VAR7:=VAR6 AND NO
5、T(REF(VAR6,1);VAR8:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1),6),6);VAR9:=EMA(MA(C,13),13);VAR10:=FILTER(LLV(VAR8,2)=LLV(VAR8,7) AND COUNT(VAR8=REF(MA(C,18),3) AND CROSS(C,MA(C,18);RSV:=(CLOSE-LLV(LOW,9)/(HHV(HIGH,9)-LLV(LOW,9)*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;金叉:=CROSS(J,D);死叉
6、:=CROSS(D,J);买1:=(VAR12 OR VAR13) AND VAR10;买2:=(VAR12 OR VAR13) AND VAR3;买3:=(VAR12 OR VAR13) AND VAR2;买4:=(VAR2 AND VAR10) OR (VAR3 AND VAR10);买5:=(金叉 AND VAR3) OR (金叉 AND VAR2) OR (金叉 AND VAR10);ST:=EXIST(C/REF(C,1)1.06,50);输出:=(买1 OR 买2 OR 买3 OR 买4 OR 买5 OR VAR7) AND ST; MA5:=MA(C,5),COLORWHITE;
7、X:=(3*C+L+O+H)/6;多空线:=(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+REF(X,20)/210,COLORFF00FF,LINETHICK1;AB:=DRAWLINE(HIGH=
8、HHV(HIGH,10),HIGH,LOW=LLV(LOW,3),HHV(HIGH,3),1),COLORYELLOW;CROSS(MA5,多空线) and CROSS(C,AB) and 输出 ;点石成金(选股公式)KS13:=(CLOSE-MA(CLOSE,13)/MA(CLOSE,13)*(-100); RSV:=(CLOSE-LLV(LOW,13)/(HHV(HIGH,13)-LLV(LOW,13)*100; FASTK:=SMA(RSV,3,1);K:=SMA(FASTK,3,1);D:=SMA(K,5,1); Var1:=CLOSE/MA(CLOSE,40)*10076;Var2:
9、=CLOSE/MA(CLOSE,60)*100LOW*1.051;Var4:=Var3 AND COUNT(Var3,5)1;Var4 AND (Var1 OR Var2) AND REF(KS13,1)=10 AND REF(KS13,1)/KS13=1.13 AND CLOSE/REF(CLOSE,1)=1.02;牛市绝底(选股公式)VAR1:=REF(CLOSE,1);VAR2:=(SMA(MAX(CLOSE - VAR1),0),7,1) / SMA(ABS(CLOSE - VAR1),7,1) * 100);VAR3:=(SMA(MAX(CLOSE - VAR1),0),13,1)
10、/ SMA(ABS(CLOSE - VAR1),13,1) * 100);VAR4:=(100 * (HHV(HIGH,48) - LOW) / HHV(HIGH,48);VAR5:=(100 * (HIGH - LLV(LOW,48) / LLV(LOW,48);牛市绝底:VAR2 15 AND VAR3 20 AND VAR4 40 AND BARSCOUNT(CLOSE) 47;飞弹一号(选股公式)var1:=c/ma(c,40)*10078; var2:=c/ma(c,60)*100=l*1.051; var4:=var3 and count(var3,5)=2; xg:var4 an
11、d (var1 or var2) and count(h=l and c=o and cref(c,1),3)=0and hhv(v/capital,30)LLV(B4,5)*1.01 AND REF(B4,1)REF(LLV(B4,5),1)*1.01AND LLV(B4,50)=LLV(B4,5);d4:=LLV(LOW,5)=LLV(LOW,50) AND LLV(LOW,5)HHV(LOW,70)*0.5;xg:c4 AND d4;火牛神功(选股公式)Var1:=DMA(CLOSE,VOL/SUM(VOL,34);Var2:=DMA(CLOSE,VOL/SUM(VOL,13);Var3
12、:=(CLOSE-Var1)/Var1*100;Var4:=(CLOSE-Var2)/Var2*100;Var4=-12 AND Var3 20),A04,0);A06:=IF(LOW A01),0,IF(HIGH 0) AND (A07 REF(A07,1) AND (A05 0 AND (趋势REF(趋势,1)AND 趋势50);Var7:=LLV(LOW,30);Var11:=SMA(ABS(L-REF(L,1),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;Var12:=HHV(Var11,30)*8;火焰山:=EMA(IF(LOW=Var7 AND 趋势0
13、AND 机构建仓区0 AND 趋势REF(趋势,1) AND REF(趋势,1) 20),A04,0);A06:=IF(LOW A01),0,IF(HIGH 0) AND (A07 REF(A07,1) AND (A05 80,趋势,80,5,0);DRAWICON(CROSS(趋势,0),0,1);STICKLINE(A09 0 AND (趋势REF(趋势,1)AND 趋势50),0,A09,6,0),colorFFff00;机构建仓区:0,LINETHICK0,colorFFFF00;Var4:=(趋势-REF(趋势,1)/REF(趋势,1)*100;STICKLINE(趋势=13,0,2
14、0,3,0),colorcc9900;DRAWTEXT(FILTER(趋势=13,15),30,准备现金),colorcc9900;STICKLINE(趋势13,0,50,2,0),color0099ff;Var5:=FILTER(趋势13),10);DRAWTEXT(Var5,60,买入),color0099ff;STICKLINE(趋势=90 AND Var4,0,30,3,0),colorgray;Var6:=FILTER(趋势=90 AND Var4),10);DRAWTEXT(Var6,40,清仓),colorgray;Var7:=LLV(LOW,30);Var8:=HHV(HIGH
15、,30); Var9:=EMA(CLOSE-Var7)/(Var8-Var7)*4,4)*25; STICKLINE(Var990,100,105,3,2),COLORRED;Var10:=(Var9-LLV(Var9,4)/(HHV(Var9,4)-LLV(Var9,4)*100; DRAWTEXT(IF(CROSS(Var9,Var10) AND Var987,95,0),88,险),Color00FF00;DRAWICON(CROSS(90,Var9),95,9);Var11:=SMA(ABS(L-REF(L,1),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;
16、Var12:=HHV(Var11,30)*8;火焰山:EMA(IF(LOW=Var7 AND 趋势0,0 ,火焰山*1.2,4,0 ),COLORRED;Var13:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9)/5;Var14:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10)/5;趋势线: 趋势,colorff0000;Var16:=MAX(EMA(Var13,2)-EMA(Var14,5),0)*200;Var17:=EMA(Var16,5);波浪峰:Var17,stick,colorff00ff;STICKLINE(
17、Var17REF(Var17,1),0,Var17,1,0),color00ff00;Var18:=MA(趋势线,8);if(CROSS(Var2,Var18) AND Var2REF(趋势线,1)AND 趋势线80,趋势,80),colorff00ff;双信号全仓选股(选股公式)FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);TTJ:=CROSS(FF,MA15);上:=EMA(C,3),COLORBLUE,LINETHICK1;中:=EMA(C,5),COLORWHITE,LINETHICK1;下:=EMA(中,5),COLOR00FF00,LINETHICK1;
18、QQ:= CREF(上,1) AND REF(上,1)0,MA2,MA2);MA5:=MA(CLOSE,5),COLOR888899;MA13:=MA(CLOSE,13),COLORFF00F0,LINETHICK2;VAR01:=CLOSE=HHV(C,4) AND (REF(C,1)=REF(C,2) OR REF(C,1)=REF(C,3) OR REF(C,1)=HHV(C,4) AND CLOSE=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C=REF(C,1) OR REF(C,3)=HHV(C,4) AND C=
19、REF(C,1) AND C=REF(C,2);收盘价=4日内收盘价的最高值 AND 昨收=2日前的收盘价 VAR02:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);收盘价=4日内收盘价的最高值 AND 昨收=4日内收盘价的最低值VAR03:=CLOSE=LLV(C,4) AND (REF(C,1)REF(C,2) OR REF(C,1)REF(C,3) OR REF(C,1)=LLV(C,4) AND CREF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=HHV(C,4) AND CREF(C,1) OR REF(C,3)=LL
20、V(C,4) AND CREF(C,1) AND CREF(C,2);收盘价=4日内收盘价的最低值 AND (昨收=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=REF(C,3) AND REF(C,2)=REF(C,1);昨收=4日内收盘价的最低值 AND 收盘价=2日前的收盘价VAR05:=REF(C,1)=HHV(C,4) AND CREF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)REF(C,2) AND REF(C,2)=REF(C,4) AND CREF(C,1);昨收=4日内收盘价的最高值 AND 收盘价R
21、EF(V5,1) AND REF(V5,1)REF(V5,2);今日V5向上形成拐点VAR07:=LOWHHV(V5,13) AND CLOSEREF(C,1) AND CLOSEOPEN;VAR08:=VAR07 AND COUNT(VAR06,2);VAR09:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1),6),6);VAR10:=EMA(MA(C,13),13);VAR11:=FILTER(LLV(VAR09,2)=LLV(VAR09,7) AND COUNT(VAR0950,2) AND CROSS(MA(VAR09,2),V
22、AR09)=1,1);VAR13:=SMA(EMA(C-REF(C,1)/REF(C,1),5)*100,3,1)*10;VAR14:=FILTER(CROSS(VAR13,0) OR CROSS(C,VAR10) AND VAR11)=1,3);VAR15:=MA(C,18)=REF(MA(C,18),3) AND CROSS(C,MA(C,18);VAR16:=VAR08 AND NOT(REF(VAR08,1);RSV:=(CLOSE-LLV(LOW,9)/(HHV(HIGH,9)-LLV(LOW,9)*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2
23、*D;金叉:=CROSS(J,D);死叉:=CROSS(D,J);买1:=(VAR14 OR VAR15) AND VAR11;买2:=(VAR14 OR VAR15) AND VAR04;买3:=(VAR14 OR VAR15) AND VAR02;买4:=(VAR02 AND VAR11) OR (VAR04 AND VAR11);买5:=(金叉 AND VAR04) OR (金叉 AND VAR02) OR (金叉 AND VAR11);TTJ0:=VAR16;TTJ1:=买1 OR 买2 OR 买3 OR 买4 OR 买5 AND MM;XG0:=TTJ AND TTJ0;XG1:=T
24、TJ AND TTJ1;XG11:=XG0 OR XG1;以下波浪理论浪底重叠买底选股原码PL5:=ZIG(3,5);EN1:=ZIG(3,5)REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)=REF(ZIG(3,5),3);EX1:=ZIG(3,5)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)=REF(ZIG(3,5),3);PL10:=ZIG(3,10);EN2:=ZIG(3,10)REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)=REF(ZI
25、G(3,10),2) AND REF(ZIG(3,10),2)=REF(ZIG(3,10),3);EX2:=ZIG(3,10)=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)=REF(ZIG(3,20),3);EX3:=ZIG(3,20)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)=REF(Z
26、IG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5REF(PL5,1);走强2:=BARSLAST(PL10REF(PL10,1);走强3:=BARSLAST(PL20REF(PL20,1);ZTJZ5:=IF(PL10REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=
27、IF(PL20REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20REF(PL10,1) AND ZTJZ5=2;TJ33:=EN2 AND DTJZ10=1;TJ44:=EN3 AND ZTJZ10=1;TJ55:=EN2 AND PL20REF(PL20,1) AND ZTJZ10=2;XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55;以下二者结合共同选股XG:=XG11 OR XG22;W18:EXIST(XG,1);涨停板敢
28、死队(选股公式)Lx1:=(EMA(AMOUNT/10000000),1) /3);Lx2:=(WINNER(C)/0.3);Lx3:=IF(c0,Lx1,V);Lx4:=IF(c100),Lx3,Lx4);量:=Lx5/1000;动量:=(EMA(量,13)*1.5);A01:=IF(量动量),量,0);A02:=BARSLAST(A010);A03:=REF(量,A02);趋势:=IF(量REF(C,1) and (量REF(量,1) and (REF(A02,2)0),888,0);量价突破:FILTER(突破 ,5 )*6;通达信选股公式:超级牛魔VAR3:=1; VAR4:=MA(C
29、LOSE,5); VAR5:=MA(CLOSE,10); VAR6:=MA(CLOSE,30); VAR7:=MA(CLOSE,60); VAR8:=EMA(COST(85),7); VAR9:=EMA(COST(15),7); VARA:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4); VARB:=INTPART(VARA*100)/100; VARC:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7); VARD:=INTPART(VARC*100)/100; VARE:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,2
30、8); VARF:=INTPART(VARE*100)/100; 短线趋势:=EMA(CLOSE,5)-EMA(CLOSE,10); 中线趋势:=EMA(短线趋势,30); VAR10:=-100*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5)+100; VAR11:=-100*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10)+100; VAR12:=-100*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20)+100; VAR13:=-100*(HHV(C
31、LOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30)+100; VAR14:=REF(中线趋势,1); VAR15:=中线趋势; VAR16:=VAR15-VAR14; VAR17:=REF(短线趋势,1); VAR18:=短线趋势; VAR19:=VAR18-VAR17; VAR1A:=OPEN; VAR1B:=CLOSE; 超级牛魔王:IF(VAR1A=VAR4 AND VAR1A=VAR5 AND VAR1A=VAR4 AND VAR1B=VARF AND VAR160 AND VAR190 AND VAR3=1,0.5,0); 盘中参考VAR3:=100
32、-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);VAR4:=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);VAR27:=VAR3REF(VOL,1) AND CLOSE
33、REF(CLOSE,1);关注:VAR27 AND COUNT(VAR27,30)=1;初升介入1V1:=(C-LLV(L,20)/(HHV(H,20)-LLV(L,20)*100;V2:=SMA(V1,20,1); V3:=SMA(V2,15,1); V4:=(3*V2+2*V3)/4; V5:= REF(V4,1); RSA:=SMA(MAX(V4-V5,0),2,1)/SMA(ABS(V4-V5),2,1)*100; RSB:=MA(RSA,10); AA:=VOL/REF(VOL,1)2; BB:=CLOSE/REF(CLOSE,1)1.07; 初升介入:IF(AA AND BB,CR
34、OSS(RSA,RSB),DRAWNULL);主力介入VAR1:=(CLOSE-MA(CLOSE,6)/MA(CLOSE,6)*100; VAR2:=(CLOSE-MA(CLOSE,12)/MA(CLOSE,12)*100; VAR3:=(CLOSE-MA(CLOSE,24)/MA(CLOSE,24)*100; VAR4:=(VAR1+2*VAR2+3*VAR3)/6; VAR5:=MA(VAR4,3)-STD(VAR4,3); VARA:=(CLOSE-LLV(LOW,9)/(HHV(HIGH,9)-LLV(LOW,9)*100; K:=SMA(VARA,3,1),COLORYELLOW;
35、VARB:=SMA(K,3,1); J:=3*K-2*VARB,COLORGREEN; 主力介入: CROSS(J,VARB) AND COUNT(VAR5=1,COLORWHITE;旺狗出击旺狗出击:CROSS(C,MA(CLOSE,55) + 2*STD(CLOSE,55) AND COAND VOL1.6*REF(VOL,1) AND VOL=2*MA(VOL,60) ANDEMA(WINNER(C)*70,3)EMA(WINNER(C*1.1)-WINNER(C*0.9)*70,3)AND VOL=1.6*MA(VOL,5) ;五线选股AVR1:=EMA(CLOSE,10); AVR2
36、:=(46.18*EMA(CLOSE,10)-31.82*EMA(CLOSE,4)/14.36; AVR3:=MA(CLOSE,9); AVR4:=MA(CLOSE,20); 五线选股:IF(CROSS(AVR1,AVR4) AND CROSS(AVR3,AVR4) AND CROSS(AVR4,AVR2),1,0); 狂牛启动1VARE:=(C-LLV(LOW,34)/(HHV(HIGH,34)-LLV(LOW,34)*100;SOLE:=SMA(SMA(VARE,3,1),3,1);BUY:=3*SMA(VARE,3,1)-2*SOLE;SCCOUNT:=COUNT(BARSLAST(CROSS(SOLE,BUY),BARSLAST(CROSS(SOLE,BUY);选股1:BUYSOLE AND REF(BUY,1)REF(SOLE,1);狂牛启动2VARE:=(C-LLV(LOW,34)/(HHV(HIGH,34)-LLV(LOW,34)*100;SOLE:=SMA(SMA(VARE,3,1),3,1);BUY:=3*SMA(VARE,3,1)-2*SOLE;SCCOUNT:=COUNT(BARSLAST(CROSS(SOLE,BUY),BARSLAST(CROSS(SOLE,BUY);选股2:CROSS(BUY,SOLE) AND