條件選股公式的添加和使用
1.條件選股公式的添加:公式管理器—條件選股公式—其他類型—新建—公式名稱用4個字簡寫—確定。
2.條件選股公式的使用:通達信選股器—條件選股—在條件選股公式欄找到自己需要的公式—加入條件—選股入板塊,確定即可。
通達信條件選股公式使用:選股公式指標可以單獨用,也可以合併用,合併用時每個條件中間加上AND,表達結束時句尾用;K線:最高價:HIGH簡寫H收盤價:CLOSE簡寫C最低價:LOW簡寫L開盤價:OPEN簡寫O成交量:VOL簡寫V換手率大於3 DYNAINFO(37)>3量比大於3 DYNAINFO(17)>3跳空高開 O>REF(C,1)*1.02昨日收陰線 REF(C,1)<REF(O,1)今天跳空低開 REF(C,1)>C今日最低價高於昨日最低價 L>REF(L,1)成交量:今日縮量至昨日的一半 V<REF(V,1)/2;當前流通股本(手)>2000000 CAPITAL>2000000當前流通股本(手)<10000000 CAPITAL<10000000籌碼獲利比例95% WINNER(C)*100>95低開高走收陽(可參閱學K線:遊資手法:定價權爭奪區)REF(C,1)>REF(O,1) AND O<REF(C,1) AND C>O AND C>REF(H,1);60日線:XG:C>MA(C,60);百日地量: V<=LLV(V,100);倍量: 倍量:=V>REF(V,1);大陰縮量:L=REF(L,1) AND V<REF(V,1)/2;獲利籌碼大於95 高高在上 :WINNER(C)*100>95;低開高走:O<REF(L,1) AND CROSS(C,REF(L,1));跳空高開:O>REF(C,1)*1.00 AND DYNAINFO(7)>DYNAINFO(4);高開假陰線:OPEN>REF(CLOSE,1)*1.03 AND CLOSE>REF(CLOSE,1) AND OPEN>CLOSE AND OPEN>CLOSE AND CLOSE>MA(CLOSE,20) AND MA(CLOSE,30)>MA(CLOSE,60) AND MA(CLOSE,60)>MA(CLOSE,120);長陰短柱N:=20;ZF:=(C-REF(C,1))/REF(C,1);XG: ((C-O)/C<=-0.04 OR ZF<=-0.04) AND V/HHV(V,N)<=0.6 AND COUNT(ZF>=0.07,N) AND C<0.9*HHV(H,240) AND DYNAINFO(9)>100;陰陽相同T1:=REF(C,1)<REF(O,1);T2:=C>O;T3:=V<REF(V,1);T4:=L=REF(L,1);T1 AND T2 AND T3 AND T4;20日3同價AA:=COUNT(L=REF(L,1),2)=2;D1:=COUNT(AA,20)>=1;AA AND D1;跳空高開, 量比>1.5O>REF(C,1)*1.02 AND DYNAINFO(17)>1.5 AND DYNAINFO(7)>DYNAINFO(4);跳空高開O>REF(C,1)*1.00 AND DYNAINFO(7)>DYNAINFO(4);昨天陰線,今天陽線,且兩天的最低價相等。陽線的成交量小於陰線的。t1:=ref(c,1)<ref(o,1);t2:=c>o;t3:=v<ref(v,1);t4:=l=ref(l,1);t1 and t2 and t3 and t4;昨日大陰今日縮量(這樣選出的股票不論今日陰陽線都在昨日大陰線內)L=REF(L,1) AND V<REF(V,1)/2;百日低量倍量:=v>ref(v,1);v<=llv(v,100);單峰密集A1:=COST(85);A2:=COST(15);A3:=A1-A2;A4:=(A1+A2)/2;單峰密集:A3/A4*100<14.45,LINETHICK0;分時橫盤X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01;{取1%振幅內粘合}X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01;AA:=MA(C,5)>REF(MA(C,5),1);BB:=MA(C,10)>REF(MA(C,10),1);CC:=MA(C,5)>MA(C,10);{均線勾頭向上}CDJZ:=ABS(MA(C,20)-MA(C,120))/MA(C,120)<0.4;{長短均線距離絕對值越小越好}MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3AND CDJZ AND AA AND BB AND CC;站到5日線MA5:=MA(C,5);MA10:=MA(C,10);MA30:=MA(C,30);AA:=CROSS(C,MA5);ZM:MA5>MA10 AND MA10>MA30 AND MA5>REF(MA5,1) AND MA10>REF(MA10,1) AND MA30>REF(MA30,1) AND AA;尖三兵(REF(C,2)>REF(C,3) AND C>REF(H,1) AND (C-REF(C,1))/REF(C,1)*100>=3 AND(REF(H,1)-MAX(REF(C,1),REF(O,1)))>1.5*ABS(REF(O,1)-REF(C,1)));待入線A:=REF(C,1)<REF(O,1);B:=O<REF(C,1);CC:=C<=REF(O,1);A AND B AND CC AND C>O;均線粘合選股公式均線粘合很少有百分百相等的情況,可以取1%振幅內粘合,並且一般是3條均線。源碼如下:X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01;X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01;MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3;5彎10:EVERY(MA(C,5)>MA(C,10),10) AND DOWNNDAY(MA(C,5)-MA(C,10),3);3日粘合M1:=MA(C,5);M2:=MA(C,10);M3:=MA(C,20);上:=MAX(M1,MAX(M2,M3));下:=MIN(M1,MIN(M2,M3));三線粘合:LLV((上-下)/下*100<0.5,3) AND M1>REF(M1,1);5日和10日線粘合M5:=MA(C,5);M10:=MA(C,10);ABS(M5-M10)<0.001;平台突破A1:=C=HHV(C,21);A2:=BARSLAST(A1);A3:=IF(A2>0,REF(C,A2),REF(C,A2));A4:=CROSS(C,REF(A3,1));XG: A4 AND COUNT(A4,5)=1;準備買入買入:=(DCLOSE-REF(C,1))/REF(C,1)*100;XG:CROSS(買入,20) OR CROSS(買入,18);STICKLINE(XG,IF(C>=O,O,C),IF(C>=O,O,C),100,0);DRAWTEXT(XG,L,"準備買入"),COLORMAGE天下A1:=REF(O,2)<REF(C,2) AND REF((H-C),2)/REF(C,20)<0.03;A2:=REF(V,1)<REF(V,2) AND REF(C,1)>REF(MA(C,80),1);A3:=REF(C,1)<REF(O,1) AND REF(C,1)<REF(O,1)<1.02;A4:=C>REF((O+C)/2,1);A5:=DYNAINFO(17)>1;A6:=CAPITAL/1000000<90;1.公式管理器—條件選股公式—其他類型—新建—確定。2.選股器—條件選股—在條件選股公式中找到需要的公式即可。N天漲停(可以找到幾天以前漲停的股票)參數 最小 最大 預設N 1.00 30.00 1.00CN:=REF(C,N);CM:=REF(C,N+1);SG:=H>CN;J:="KDJ.J"<103;ZT:=IF((CN-CM)*100/CM>=(10-0.01*100/CM),1,0);V5:=MA(V,5);V10:=MA(V,10);WOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);LS:=WOL>=V5 OR WOL>=V10;ZDXG:SG AND J AND ZT AND LS;N天前漲停參數 最小 最大 預設N 1.00 100.00 3.00CN:=REF(C,N);CM:=REF(C,N-1);漲停:IF((CM-CN)*100/CN>=(10-0.01*100/CN),1,0);N天內出現漲停參數 最小 最大 預設N 1.00 100.00 20.00EZT:=HIGH>REF(CLOSE,1)*1.1; { 出現過漲停 }EZTO:EXIST(EZT,N); { N天內存在過漲停 };均線多頭排列通俗點說均線多頭排列,就是說5日線在最上面,其次是10日線,20日線.30日線,所有的均線都是向上趨勢,多頭排列表明現在持有這個股票的人幾乎都是獲利的。多頭排列的股票肯定是上漲的。對短線操作來說,更是如此.不論是追漲還是抓突破性買入機會,主要考慮的因素就是市場態勢及個股的均線排列形態.一定要迴避盤整走勢,重點選擇各周期均線完全多頭排列的品種參與,中長期均線至少要處於走平狀態.參數 最小 最大 預設N1 2.00 200.00 5.00N2 2.00 200.00 10.00N3 2.00 200.00 20.00N4 2.00 200.00 30.00A1:=MA(CLOSE,N);A2:=MA(CLOSE,N1);A3:=MA(CLOSE,N2);A4:=MA(CLOSE,N3);CLOSE>A1 AND A1>A2 AND A2>A3 AND A3>A4 AND CLOSE>OPEN;多頭排列XG:C>MA(C,5) AND MA(C,5) >MA(C,10) AND MA(C,10) > MA(C,30) AND MA(C,30) >MA(C,60);價托參數 最小 最大 預設N1 2.00 200.00 5.00N2 2.00 200.00 10.00N3 2.00 200.00 20.00MA1:=MA(CLOSE,N1);MA2:=MA(CLOSE,N2);MA3:=MA(CLOSE,N3);TUO:=COUNT(CROSS(MA1,MA2),21)=1 AND CROSS(MA2,MA3) ANDCOUNT(CROSS(MA1,MA3),21)=1 ANDBARSLAST(CROSS(MA1,MA2))>BARSLAST(CROSS(MA1,MA3)) ANDBARSLAST(CROSS(MA1,MA3))>BARSLAST(CROSS(MA2,MA3)) ANDMA1>REF(MA1,1);均線金叉參數 最小 最大 預設N 5.00 100.00 20.00MA5:=MA(C,5);MA10:=MA(C,10);MA20:=MA(C,20);股價穿三均線:IF(CROSS(C,MA5) AND CROSS(C,MA10) AND CROSS(C,MA20),1,0),COLORRED;老鴨頭MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA60:=MA(CLOSE,60);PDAY1:=BARSLAST(CROSS(MA5,MA60));{5日均線上穿60日均線}PDAY2:=BARSLAST(CROSS(MA10,MA60));{10日均線上穿60日均線,至此形成鴨頸部}PDAY3:=BARSLAST(HIGH=HHV(HIGH,PDAY2));{形成頭部,要下跌}PDAY4:=BARSLAST(CROSS(MA10,MA5));{下跌後,5日均線和10日均線死叉}PDAY5:=BARSLAST(CROSS(MA5,MA10));{回落不久,5日均線和10日均線形成金叉,形成嘴部}A1:= PDAY1>PDAY2 AND PDAY2>PDAY3 AND PDAY3>PDAY4 AND PDAY4>PDAY5 AND PDAY5<5;A2:= COUNT(CROSS(MA10,MA5),PDAY2)=1;A1 AND A2;尖三兵 尖三兵:捕捉瘋牛絕勝K線戰法K線理論已經有200年的歷史,既然K線能成為各種軟體的主圖;說明在技術分析的領域佔有極其重要的位置。有的人說看K線沒有用,我承認現在主力的手法變化莫測,各種騙線、震倉讓人頭暈目眩,但我們可以利用均線、成交量輔助分析;有經驗的朋友可以結合盤口觀察來操作。K線組合尖三兵又叫多頭三兵,尖三兵不是我們常說的紅三兵,紅三兵是起步初升,而尖三兵是拉升,作為做短線時間短、收益高是我們追求的目標;尖三兵是我短線選股的方法之一,在股票書籍上是看不到的。K線組合:尖三兵「尖三兵」由3根K線組合而成:第一天為陽線;第二天為長上影線的陽線(陰線也可);第三天為大中陽線,要求第三天陽線的收盤價格必須高於第二天K線的最高價。「尖三兵」的市場意義為:某股經過一段時間的縮量下跌,以陽線止跌起穩,然後主力試盤兼洗盤,主力目的達到後主力繼續吃貨形成放量的大陽線,第三天陽線的收盤價格高於第二天K線的最高價說明主力做多意願堅決。當你發現這種K線組合買入後很快就有不菲的收益。提示:認真分析該股近段時間的消息與基本面以及市場環境,防止主力騙線。(ref(c,2)>ref(c,3) and c>ref(h,1) and (c-ref(c,1))/ref(c,1)*100>=3 and(ref(h,1)-max(ref(c,1),ref(o,1)))>1.5*abs(ref(o,1)-ref(c,1)));三串陰STAR:EVERY(CLOSE<OPEN,3);縮量VOL/REF(VOL,1)<0.5;共振{15分鐘,30分鐘,60分鐘,日線MACD共振}DIF:= EMA(CLOSE,12) - EMA(CLOSE,26);DEA:= EMA(DIF,9);MACD:=2*(DIF-DEA);DIF60:=MACD.DIF#MIN60(12,26,9);DIF30:=MACD.DIF#MIN30(12,26,9);DIF15:=MACD.DIF#MIN15(12,26,9);DEA60:=MACD.DEA#MIN60(12,26,9);DEA30:=MACD.DEA#MIN30(12,26,9);DEA15:=MACD.DEA#MIN15(12,26,9);選股:CROSS(DIF,DEA) AND CROSS(DIF60,DEA60)AND CROSS(DIF30,DEA30) AND CROSS(DIF15,DEA15);MACDVAR1:=(EMA(C,12)-EMA(C,26))*100+50;VAR2:=EMA(VAR1,9);VAR3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;VAR5:=SMA(VAR4,13,8);VAR6:=SMA(VAR3,21,8);VAR7:=MA(C,80)-MA(C,10)/7;VAR8:=EMA(C,5);VAR9:=MA((LLV(C,9))*1.1,14);VAR10:=2*VAR9-VAR8-C*0.1;VAR11:=IF(((VAR8-VAR10)*5>0),(POW((VAR8-VAR10)*5,2))/10,(-1*(POW((VAR8-VAR10)*(5),2)))/(10));VAR12:=IF((VAR11>0),VAR11-0,12);VAR13:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;趨勢:=CEILING(SMA(VAR5,13,8));看底:趨勢-VAR6<-65;MACD,KDJ金叉DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;DEA:=EMA(DIF,9);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,1);D:=SMA(K,9,1);B4:CROSS(DIF,DEA) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));六脈神劍DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);DEA:=EMA(DIFF,5);A1:=DIFF>DEA;RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;K:=SMA(RSV1,3,1);D:=SMA(K,3,1);A2:=K>D;LC:=REF(CLOSE,1);RSI1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(ABS(CLOSE-LC),5,1))*100;RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;A3:=RSI1>RSI2;RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;LWR1:=SMA(RSV,3,1);LWR2:=SMA(LWR1,3,1);A4:=LWR1>LWR2;BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;A5:=CLOSE>BBI;MTM:=CLOSE-REF(CLOSE,1);MMS:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);A6:=MMS>MMM;漲買入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,7,0);股價站到10日線上(數字10可任意修改)CROSS(MA(C,1),MA(C,10));均線收陰或是多頭陰線MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,30) AND MA(C,30)>MA(C,60) AND O>C;跌破5日線A1:=MA(CLOSE,5);A2:=MA(CLOSE,10);A3:=MA(CLOSE,20);A4:=MA(CLOSE,60);A1>A2 AND A2>A3 AND A3>A4 AND CLOSE<A1;主升浪參數 最小 最大 預設N 2.00 100.00 10.00VAR1:=LLV(LOW,10);VAR2:=HHV(HIGH,25);AA:= EMA((CLOSE-VAR1)/(VAR2-VAR1)*4,4);BB:=C>O AND ((C-REF(C,1))/REF(C,1))>0.03;DME:=HHV(MA(HIGH,3),2);STI:=LLV(MA(HIGH,3),1);DIF:=(STI-DME);CC:=ABS(STI-DME)<0.1 AND (ABS(REF(DIF,1))>ABS(DIF));主升浪選股:AA<2.5 AND DYNAINFO(4)>0 AND BB AND CC;老鼠倉AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;DRAWTEXT(FF1,(LOW* 0.97),"老鼠倉"),COLOR4080FF;盤中橫盤BETWEEN(ABS((C-DYNAINFO(11))/C),0,0.02) ANDBETWEEN(ABS((C-DYNAINFO(4))/C),0,0.02) ANDHIGH<=DYNAINFO(4)*1.02 ANDLOW>=DYNAINFO(4)*0.98 ANDDYNAINFO(4)>=DYNAINFO(3);均線量線參數 最小 最大 預設N 2.00 100.00 10.00M1:=MA(CLOSE,5);M2:=MA(CLOSE,10);MA1:=MA(VOL,5);MA2:=MA(VOL,10);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);A1:=DEA;F1:=DIF;K1:="KDJ.K";J1:="KDJ.J";金叉1:=CROSS(M1,M2);金叉2:=CROSS(MA1,MA2);金叉3:=CROSS(F1,A1);金叉4:=CROSS(J1,K1);選1:=金叉1 AND 金叉2 AND 金叉3 AND 金叉4;選2:=金叉1 AND 金叉2 AND 金叉3;選3:=金叉2 AND 金叉3 AND 金叉4;選4:=金叉1 AND 金叉2 AND 金叉4;選5:=金叉1 AND 金叉3 AND 金叉4;選股:選1 OR 選2 OR 選3 OR 選4 OR 選5;均量線V1:=CROSS(MA(V,10),MA(V,20));V2:=CROSS(C,MA(C,20));V3:=COUNT(CROSS(MA(V,5),MA(V,10)),5)=1;V4:=MA(C,5)>REF(MA(C,5),1) AND REF(MA(C,5),1)<REF(MA(C,5),2) ANDC>MA(C,5);均價量線XG:IF(V1 AND V2 AND V3 AND V4,1,0);底背離黑馬DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIFF,9),COLORFFFF00;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背離:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);DEA0:=EMA(DIFF*100,9);MACD0:=2*(DIFF*100-DEA0);黑馬:=(MACD0>REF(MACD0,1)*2.5 AND MACD0>15);底背離 AND 黑馬;四線合一參數 最小 最大 預設N 2.00 100.00 2.00MA5:=MA(CLOSE,5);MA24:=MA(CLOSE,24);A1:=MA(VOL,5);A2:=MA(VOL,60);四線合一:CROSS(MA5,MA24) AND CROSS(A1,A2);四線粘合MA1:=MA(C,5);MA2:=MA(C,10);MA3:=MA(C,20);MA4:=MA(C,30);P2:=ABS(MA1-MA2)+ABS(MA2-MA3)+ABS(MA1-MA4)+ABS(MA2-MA4)+ABS(MA3-MA4)+ABS(MA1-MA3);四線粘合:IF(P2/C<6/100 AND MA1>REF(MA1,1) AND MA2>REF(MA2,1),666,0)COLORYELLOW,LINETHICK;均線量線金叉見底DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA1:=EMA(DIFF1,9);MACDD:=CROSS(DIFF1,DEA1);均線1:=CROSS(MA(C,5),MA(C,10));量線1:=CROSS(MA(V,5),MA(V,10));DRAWICON(MACDD AND 均線1 AND 量線1,L-0.20,9);{同時金叉顯示9號圖標};黃金買賣AA:=(O+H+L+C)/4;B1:=HHV(AA,60);B2:=LLV(AA,60);B3:=B1-B2;B4:=EMA((AA-B2)/B3,2)*100;中期:=B4;XG:FILTER(中期>REF(中期,1)AND 中期<5 AND C>REF(C,1),5);梅開二度MA60:=MA(VOL,60);TJ1:=VOL=HHV(VOL,10) AND VOL>1.7*REF(VOL,1) AND C>=REF(C,1) AND C>=O AND VOL<=MA135*3.5;LJL:=FILTER(TJ1,3);TJ3:=IF(BARSLAST(LJL)=1 AND CLOSE>REF(LOW,3),1,0);ST:=TJ3=1;CL:=FILTER(ST,3);STICKLINE(LJL,OPEN,CLOSE,1,0),;低陽倍量BLZ:=VOL>REF(V,1)*1.9;倍量柱:=BLZ,COLORYELLOW;HJZ:=(3*C+H+L+O)/6;HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ,5)+2*REF(HJZ,6)+REF(HJZ,8))/36;黃金柱:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;倍量黃金柱:=倍量柱 AND 黃金柱;REF(倍量黃金柱,3);複合顧比K1:=EMA(C,5);K2:=EMA(C,10);K3:=EMA(C,20) ;K4:=EMA(C,30);K5:=EMA(C,60) ;K6:=EMA(C,120);K7:=EMA(C,250);K1>K2 AND K2>K3 AND K3>K4 AND K4>K5 AND K5>K6 AND K6>K7;漲停公式T:=IF((BARSCOUNT(C) > 7),(100)*((MA(C,7))/(LLV(MA(C,7),7)) - 1),1);N:=IF((T > 0.35),6,65);W:=((-((100)*(HHV(H,N) - C))/(HHV(HIGH,N) - LLV(L,N))));RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;J0:=(HIGH+LOW)/2;QJ:=EMA(J0,3);J1:=IF(CLOSE>QJ,VOL,0);J2:=IF(CLOSE<QJ,VOL,0);BB:=MA(SUM(J1-J2,22),3);累加:=21*BB+20*REF(BB,1)+19*REF(BB,2)+18*REF(BB,3)+17*REF(BB,4)+16*REF(BB,5)+15*REF(BB,6)+14*REF(BB,7)+13*REF(BB,8)+12*REF(BB,9)+11*REF(BB,10)+10*REF(BB,11)+9*REF(BB,12)+8*REF(BB,13)+7*REF(BB,14)+6*REF(BB,15)+5*REF(BB,16)+4*REF(BB,17)+3*REF(BB,18)+2*REF(BB,19)+REF(BB,20);WM:=累加/(21+1)/21*2;CC:=WM;VAR3:=(BB-CC);VAR4:=SMA(RV,3,1);VAR5:=SMA(VAR4,3,1);KK:=EMA(SMA(RG,3,1),2);DD:=SMA(KK,3,1);漲停100%:CROSS(W,-2) AND CROSS(VAR4,VAR5) AND CROSS(KK,DD);雙陰陽JX:=EVERY(MA(C,5)<REF(MA(C,5),1),3);DF:=(C-REF(C,1))/REF(C,1)*100;SY:=REF(C>O AND C>REF(C,1),1) AND C>O AND O<REF(C,1) AND C/REF(C,1)<1.02;XG:JX AND REF(DF,2)<-2 AND SY;倍量過左峰{1.黃金柱}JJ:=(3*C+H+L+O)/6;VAR1:=(8*JJ+7*REF(JJ,1)+6*REF(JJ,2)+5*REF(JJ,3)+4*REF(JJ,4)+3*REF(JJ,5)+2*REF(JJ,6)+REF(JJ,8))/36;TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1 AND C>REF(C,1);LJL:=FILTER(TJ1,3);黃金線:=REF(LOW,BARSLAST(LJL));黃金柱:=FILTER(TJ1,3);{2.倍量過左峰}SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);SR2:=FILTER(SR1,10);SR3:=BACKSET(SR2,10+1);HD:=FILTER(SR3,10);前高:=REF(H,BARSLAST(HD));倍量:=(VOL/REF(VOL,1)>2 AND COUNT(CLOSE>OPEN,1)) OR (LOW>REF(HIGH,1) AND COUNT(OPEN>CLOSE,1) AND VOL/REF(VOL,1)>2);突破前高:=CROSS(C,前高);倍量過左峰:= 突破前高 AND 倍量;{3.凹口起柱}T7:=REF(VOL,6)/REF(VOL,7)>=2;T6:=REF(VOL,5)/REF(VOL,6)>=2;T5:=REF(VOL,5)/REF(VOL,4)>=1.5;T4:=REF(VOL,4)/REF(VOL,3)>=1.5;T3:=REF(VOL,2)/REF(VOL,3)>=1.5;T1:=V/REF(VOL,1)>2;T0:=C>O AND C>REF(C,1);凹口起柱:= T7 AND T1 AND T0 OR T6 AND T1 AND T0 OR T5 AND T1 AND T0 OR T4 AND T1 AND T0OR T3 AND T1 AND T0 ;{凹口起柱}AKQZ:= 黃金柱 AND 凹口起柱;{4.前高低位}X:=21;TTY:=H;AAT:=REF(TTY,X)=HHV(TTY,2*X+1);BBT:=FILTER(AAT,X);CCT:=BACKSET(BBT,X+1);HD10T:=FILTER(CCT,X);AA1T:=REF(TTY,X)=LLV(TTY,2*X+1);BB1T:=FILTER(AA1T,X);CC1T:=BACKSET(BB1T,X+1);LD10T:=FILTER(CC1T,X);前期高位:=REF(H,BARSLAST(HD10T));前期低位:=REF(L,BARSLAST(LD10T));{突破前高}TPQG:= 黃金柱 AND 倍量過左峰 AND C>前期高位;{選股}XG: (COUNT(TPQG,10) OR COUNT(AKQZ,10)) AND COUNT(CROSS(黃金線*1.01,L),3)>0 AND L>=黃金線 AND C>REF(C,1) AND REF(C,2)>REF(C,1) AND COUNT(LJL,3)=0;均線多頭排列超強選股法通俗點說均線多頭排列,就是說5日線在最上面,其次是10日線,20日線.30日線,所有的均線都是向上趨勢,多頭排列表明現在持有這個股票的人幾乎都是獲利的。多頭排列的股票肯定是上漲的。對短線操作來說,更是如此.不論是追漲還是抓突破性買入機會,主要考慮的因素就是市場態勢及個股的均線排列形態.一定要迴避盤整走勢,重點選擇各周期均線完全多頭排列的品種參與,中長期均線至少要處於走平狀態.通達信均線多頭排列選股公式N 1 500 5N1 1 500 10N2 1 500 20N3 1 500 30A1:=MA(CLOSE,N);A2:=MA(CLOSE,N1);A3:=MA(CLOSE,N2);A4:=MA(CLOSE,N3);CLOSE>A1 AND A1>A2 AND A2>A3 AND A3>A4 AND CLOSE>OPEN;A1賦值:收盤價的N日簡單移動平均A2賦值:收盤價的N1日簡單移動平均A3賦值:收盤價的N2日簡單移動平均A4賦值:收盤價的N3日簡單移動平均收盤價>A1 AND A1>A2 AND A2>A3 AND A3>A4 AND 收陽線均線系統呈多頭排列,多方佔據一定優勢.極品【DDE均線多頭選股公式】 通達信{DDE均線多頭選股公式}JUJ:=(HIGH+LOW+CLOSE)/3;QUJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);QUJ1:=IF(CAPITAL=0,QUJ0*(JUJ-MIN(CLOSE,OPEN)),QUJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));QUJ2:=IF(CAPITAL=0,QUJ0*(MIN(OPEN,CLOSE)-LOW),QUJ0*IF(HIGH=LOW,1,(JUJ-MIN(CLOSE,OPEN))));QUJ3:=IF(CAPITAL=0,QUJ0*(HIGH-MAX(OPEN,CLOSE)),QUJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));QUJ4:=IF(CAPITAL=0,QUJ0*(MAX(CLOSE,OPEN)-JUJ),QUJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JUJ)));QUJ5:=QUJ1+QUJ2;QUJ6:=QUJ3+QUJ4;DD:=(QUJ5-QUJ6)/(QUJ5+QUJ6)*100;DDZ:=DD*17;DDX:=((QUJ1+QUJ2)-(QUJ3+QUJ4))/IF(CAPITAL=0,1000000,10000);DX:=MA(DDX,5)*20;DDX1:=SMA(DX,3,1);DDX2:=SMA(DDX1,3,1);DDX3:=EMA(DDX2,5);DDY:=((QUJ2+QUJ4)-(QUJ1+QUJ3))/IF(CAPITAL=0,1000000,10000);DY:=MA(DDY,5)*22;DDY1:=SMA(DY,3,1);DDY2:=SMA(DDY1,3,1);DDY3:=EMA(DDY2,5);CC:=ABS(REF(CLOSE,1)-CLOSE)/CLOSE*100;JJ:=CC>0 AND CC<3;AA:=DDX1>DDX2 AND DDX2>DDX3 AND DDX1>DDX3;BB:=DDY1>DDY2 AND DDY2>DDY3 AND DDY1>DDY3;HH:=AA>0 AND BB>0 AND DDZ>300 AND JJ>0;HH>0;短期均線多頭排列 通達信A1:=MA(CLOSE,5);A2:=MA(CLOSE,10);A3:=MA(CLOSE,20);A4:=MA(CLOSE,30);CLOSE>A1 AND A1>A2 AND A2>A3 AND A3>A4 AND CLOSE>OPEN;多頭雙陰回打5-10日均線多頭雙陰回打選股MA5:=MA(C,5);MA10:=MA(C,10);A1:=MA5>=REF(MA5,1) AND MA5>=MA10;A2:=C<O AND REF(C,1)<REF(O,1);A3:=BETWEEN(C,MA10,MA5*1.01);A1 AND A2 AND A3;均線多頭粘合選股的公式參數可以自行設置:D為均線多頭排列天數,N1,N2,N3為漲幅限制,可根據自己需要設置!MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA20:=MA(CLOSE,20);MA30:=MA(CLOSE,30);A1:=MA5>MA10 AND MA10>MA20 AND MA20>MA30 AND ALL((MA5>MA10 AND MA10>MA20 AND MA20>MA30),D);A2:=((MA5-MA10)/MA5)*100<N1 AND ((MA10-MA20)/MA10)*100<N2 AND ((MA20-MA30)/MA20)*100<N3;A3:=A1 AND A2;FILTER(A3,5);股價漲幅不大,找放量的C/REF(C,3)<1.4 AND C/REF(C,5)<1.5 AND C/REF(C,10)<1.6 AND C/REF(C,20)<2 AND C/REF(C,60)<3 AND C/REF(C,120)<3;選股小技能(含公式源碼)1,30個交易日內,股價跌幅達到一半的股票:xg:(hhv(c,30)-c)/hhv(c,30)>0.5;2,今天的量 是5天平均的 2倍以上xg:v>ma(v,5)*2;縮量vol/ma(vol,10)<0.3;3,兩天內,累計下跌等於或超過20%選股.xg:(ref(c,2)-c)/c>0.2;4,股價是25天以來新低.xg:c<ref(llv(c,25),1);5,選股:EXPMA 5日與10日金叉 並且第二天的收盤價在EXPMA的5日線以上.cross(ref(ema(c,5),1),ref(ema(c,10),1)) and c>ema(c,5);6,請編買入公式:1. 將BIAS指標的參數設置為24日,將KD指標的參數設置為9;3;3。2. BIAS指標要小於-6,這只是確認該股超跌的初選條件。3. KD指標產生黃金交叉,K線上穿D線。4. KD交叉同時,KD指標中的D值要小於16。BIAS3 :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100,colorff00ff;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1),COLORWHITE;D:=SMA(K,3,1),COLORYELLOW;xg:BIAS3<-6 and cross(k,d) and d<16;7,要求是量大、換手率達到3左右,漲幅>7個點。xg:v/capital*100>3 and (c/ref(c,1)>1.07;8,個股分時圖上都有一條黃線,叫做均價線a/capital*100;9,"陰轉陽"的公式(也就是昨天收陰線,今天收陽線)xg:ref(c,1)<ref(o,1) and c>o;10,股價回抽20日均線選股公式xg:ref(c,1)>ma(c,20) and cross(ma(c,20),c);11,一根大陽線,至少有5個點以上,再連著出現二根振幅不大於5的十字星或是小K線xg:(ref(c,3)-ref(c,4))/ref(c,3)>0.05 and count((h-l)/l<0.05,2)=2;12,行情信息里的「漲幅」的原碼(c-ref(c,1))/c*100;13,kdj的J從上向下穿越O軸發出信號RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1),COLORWHITE;D:=SMA(K,3,1),COLORYELLOW;J:=3*K-2*D,COLORFF00FF;xg:cross(0,j);14,股價4天中有兩天在10日線上count(c>ma(c,10),4)=2;15,選出10天內出現了漲停的個股count(c/ref(c,1)>1.1,10)>0;又:今漲停:=C/REF(C,1)>1.09;選股:count(今漲停,n);16,一陽上穿10,20,30日線,量能是前一天3倍。xg:cross(c,ma(c,10)) and cross(c,ma(c,20)) and cross(c,ma(c,30)) and v>ref(v,1)*3;17,共三根K線,第一根K線為陰線;第二根K線為陰線線,最高價低於第一根K線,最低價高於第一根K線;第三根K線陰陽不限,最高價低於第二根K線,最低價高於第二根K線。滿足後發出信號~w1:=ref(c,2)<ref(o,2);w2:=ref(h,2)>ref(h,1) and ref(l,2)<ref(l,1);w3:=ref(h,1)>h and ref(l,1)<l;xg:w1 and w2 and w3;18, 選出今日成交量大於昨日成交量一成的股票。xg:v>ref(v,1)*1.1;19, 連續5天,當日的5日均線減前一天的5日均線差值小於1.count((ma(c,5)-ref(ma(c,5),1))<1,5)=5;20,股價上穿5周均線:xg:cross(c,ma(c,5));注意:選股時用周線21,上穿30日均線的公式xg:cross(c,ma(c,30));22,兩筆陰線中間夾著一根陽線或數根K線,其中兩筆陰線最低點相等xg:ref(l,2)=l;23,量比大於1 同時換手大於2的公式xg:v/ref(v,1)>1 and AMOUNT/CAPITAL*100>2;24,換手:VOL*100/CAPITAL;周期換手:SUM(換手,10);25,流通盤小於4000萬的選股公式xg:CAPITAL/100<4000;26,漲停開盤跌停收盤選股xg:h/ref(c,1)>1.1 and ref(c,1)/l>1.1;27,當天開盤價與收盤價相等的選股公式xg:c=o;28,5日均線向上 流通盤小於5000萬 換手率大於3的選股公式lt:CAPITAL/100<5000;換手:=VOL*100/CAPITAL<3;w1:ma(c,5)>ref(ma(c,5),1);xg:lt and 換手 and w1;29,收下影線xg:c>l;30, o=l就沒有下引線了,那就:xg:c>l and o>l;31,當日收盤下穿5日均價xg:cross(ma(c,5),c);32,最低價小於前一日的最低價但收盤後為陽線。xg:l<ref(l,1) and c>o;33,30日內到本日收盤價下跌20%的公式xg:hhv(c,30)/c>1.2;34,選周線跳空缺口的個股。xg:HIGH<REF(LOW,1) ORLOW>REF(HIGH,1);周期選周線35,30日均線走平或走高的個股xg:ma(c,30)>ref(ma(c,30),1);36,連續4天的收盤價格波動幅度在3%之內連續走平或向上count(abs(c-ref(c,1)/ref(c,1))<0.03 and c>ref(c,1),3)=3;37,下影線長於上影線(c-l)>(h-c);38, 收盤價+收盤價的10%(c+c*0.1);39,今天高開的公式c>o;40,今天的量大於等於昨天量的2倍,股價上漲xg:v>ref(v,1)*2 and c>ref(c,1);41,今天的量小於昨天量的2倍以上,股價上漲xg:v<ref(v,1)*2 and c>ref(c,1);42,大部分股票跌到43日均線時就會反彈,如果在43日均線附近買入,短線成功率佔90%以上,即時選出還差幾分錢就跌到43日均線的股票。xg:abs(c-ma(c,43))/ma(c,43)<0.01;43,{選出每天換手5%-15%之間的股票}Var1:=100*VOL/CAPITAL;w1:=var1>5;w2:=var1<15;xg:w1 and w2;44,換手率10天80%以上的選股公式sum(VOL/CAPITAL*100,10)>80;45,60個交易日內,漲幅大於9.9%(漲停)的天數count(c/ref(c,1)>1.099,60);46,昨天跌幅大於3%,今天開盤高開2%以上的選股公式。xg:ref(c,1)/ref(c,2)<0.97 and o/ref(c,1)>1.02;47,選出周換手率小於10%的股票sum(VOL/CAPITAL*100,5)<10;48,成交量創20日新低,並且股價也創20日新低xg:v=llv(v,20) and c=llv(c,20);49,5日不漲,綠線收盤選票指標count(c<o,5)=5;50,"今日MACD等於昨天的MACD ,且macd>0" 的指標DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);xg:macd=ref(macd,1) and macd>051,連續2天收盤價跌破30日均線,就顯示"賣出"信號a1:count(c<ma(c,30),2)=2;drawtext(a1,c,"賣出"),colorgreen;52,股票在這條均線上在8天以上,上下幅度不大,a1:abs((c-ma(c,120))/ma(c,120))<0.1;xg:count(a1,8)=8;53, 連續三天高開高走的選股公式count(o>ref(c,1) and c>o,3)=3;54,n天內曾經有m個漲停count(c/ref(c,1)>1.09,n)>m;55,股價比昨天的高,量比昨天小,放量。xg:c>ref(c,1) and v<ref(v,1) and ref(v,1)>ref(v,2)*2;56,連續3天每天的最低價都比前一天高count(l>ref(c,1),3)=3;57,周量縮小50%或40%或n%a1:vol/capital*100;xg:a1/ref(a1,1)<n/100;58,股價超過五日均價的15%以上,並給出賣出信號賣出:c/ma(c,5)>1.15;59,連收兩個十字星的選股公式count(abs((c-o)/o<0.01),2)=2;60,n橫盤天數,n1橫盤的上下幅度REF(((HHV(H,N)-LLV(L,N))/LLV(L,N)),1)<=(n1/100)and ref(v,1)<ref(ma(v,5),1) and cross(v,ma(v,5)) and cross(v,ma(v,10));61,收盤價連續8天都站在5日均線的股票。count(c>ma(c,5),8)=8;62,振幅大於5%,收盤價大於3.5小於15元,三日均線大於昨日的三日均線,去掉ST股。a1:=h/l>1.05;a2:=c>3.5 and c<15;a3:=ma(c,3)>ref(ma(c,3),1);xg:a1 and a2 and a3;63,收盤價下有60天前的遠期獲利盤n%。{60天前的遠期獲利盤:=ppart(60)*100;}aa:WINNER(ref(c,60 ))*100;64,連續三日收陽後日收盤高於前日且每日收於當日最高價附近每日漲幅不大於4%選股:count(c>o and c>ref(c,1) and abs((h-c)/c)<0.01 and c/ref(c,1)<1.04,3)=3;65,昨日收陰, 今日收陽,的K線組合。C>O AND REF(C,1)<REF(O,1);66,股價突破5ma買入,跌破5ma賣出。買入和賣出用箭頭表示(副圖)a1:cross(c,ma(c,5));a2:cross(ma(c,5),c);drawtext(a1,low*0.98,"↑"),colorred;drawtext(a2,h*1.02,"↑"),color00ffff;67,今天的250平均線大於昨天的昨天的250平均線ma(c,250)>ref(ma(c,250),1);68,歷史高點到前一高點畫線POLYLINE(h>=hhv(c,0),h);69,均線中增加一根線,這根線的價格是5日線的1.2倍aa:ma(c,5)*1.2;70,20天均線向上的股xg:ma(c,20)>ref(ma(c,20),1);71,連續3天收盤全是陰線。count(c<ref(c,1),3)=3;72,今天收盤價在昨天收盤價-2%~2%之間c/ref(c,1)>0.98 and c/ref(c,1)<1.02;73,收盤價在5日均線以上5天count(c>ma(c,5),5)=5;74,N天前換手率大於8%REF(VOL/CAPITAL*100,N)>8;75,一條均線18MA 股價上漲後「縮量」回調到18MAXG:COUNT(V<REF(V,1) AND C<O,N)=N AND C>MA(C,18);N 「縮量」回調的天數76,1。昨日量是n天以來最低量,(n可調);2。今日量是昨日量的m倍,(m可調);3。今日k線收陽線;xg:ref(v,1)=llv(ref(v,1),n) and v>ref(v,1)*m and c>o;77,第一天收陰,第二天,第三天,第四天,收出紅三兵XG:REF(C,3)<REF(C,4) AND COUNT(C>O,3)=3;78,月k線十字星收盤 並且5月線拐點向上。XG:ABS(C-O)/O<0.02 AND MA(C,5)>REF(MA(C,5),1);用月線選股79,最近3天(包括昨天.前天)股價突破250日均線COUNT(C>MA(C,250),3)=3;80,跳高大陰線,條件: 1 開盤跳空4%以上2 大陰線實體6%以上.O/REF(C,1)>1.04 AND C/REF(C,1)<0.94;81,條件:1: 假設大前天創最近新高,要求這天漲幅是超過7%的大陽線,且創最近一個月的新高.2: 那麼前天,昨天,今天都收小K線,要求小K線實體xg:ref(c,3)/ref(c,4)>1.07 and ref(c,3)=hhv(c,20) and count(abs((c-ref(c,1))/ref(c,1)<0.02,3)))=3;82,60與120均線距離在n%內XG:ABS((MA(C,60)-MA(C,120))/MA(C,120))<N/100;83,5日均線傾角大於60度X:(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.1415926)>60;也可以這樣:X:(ATAN((EMA(C,5)/REF(EMA(C,5),1)-1)*100)*180/3.1415926)>60;利用指標排序:X:(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.1415926);84,「中陰之後,跳拉陽」c/ref(c,1)>1.05;85,count(x,n) 意思是n天內出現過信號的,假設n=10,那麼就是10天內出現信號(包括今天),如果不加這個的話,就是限定在今天出信號才選出來,以前的不管。86, 今天漲停的公式C/REF(C,1)>1.09;87,10日內有漲停的公式今漲停:=C/REF(C,1)>1.09;選股:count(今漲停,10);88,昨日前日漲停的REF(C,1)/REF(C,2)>1.095;89,近5日K線最高價和最低價格波動在10%以內,成交量是昨日2倍,收盤漲5%XG:(HHV(C,5)-LLV(C,5))/LLV(C,5)<0.1 AND V>REF(V,1)*2 AND C/REF(C,1)>1.05;90,60與120均線距離在n%內XG:ABS((MA(C,60)-MA(C,120))/MA(C,120))<N/100;91,「中陰之後,跳拉陽」c/ref(c,1)>1.05;92,能在圖上提示個股(不含S或ST股)出現過的漲跌停板日期的公式w1:if((c-ref(c,1))/ref(c,1)>0.1,date-1000000,c);93,漲幅≤2%(c-ref(c,1)/ref(c,1)*100<2;94,5日,10日,30日貼近公式,越貼越好m1:=ma(close,5);m2:=ma(close,10);m3:=ma(close,20);m4:=ma(close,30);y1:=max(max(max(m1,m2),m3),m4);x1:=min(min(min(m1,m2),m3),m4);黏合:y1/x1<n;n越小越黏合(n,1.01-----1.05)95,(1)換手率均線DMA(c ,v/CAPITAL );(2)20天以來的任意天期(n),換手率均線正負波動值<=p%;AA:=DMA(c ,v/CAPITAL );ab:=(aa-ref(aa,1))/ref(aa,1)*100<p;bb:count(ab,20)>=n;96, 30天線拐頭向上出現提示ma(c,30)>ref(ma(c,30),1);97,今天的換手率大於前天的一倍以上w1:=v*100/capital;w1>ref(w1,2)*2;98,K線沿著5日均線往上爬的選股公式w1:ma(c,5);w2:abc(c-w1)/w1<0.01;xg:count(w1>ref(w1,1),5)=5 and w2;99,20日均線,上穿62日均線xg:cross(ma(c,20),ma(c,62));100,平台整理的公式,整理時間和整理幅度可調COUNT(CLOSE,0)>N AND(HHV(CLOSE,N)-LLV(CLOSE,N))/LLV(CLOSE,N)<=(N1/100);N整理時間,N1整理幅度101,選出當日收盤價突破10日均線5%的個股cross(c,ma(c,10)*1.05);102,選出當日最低價在10日均線上下0.05%內,收盤價在均線上方的個股abs(l-ma(c,10))<0.005 and c>ma(c,10);103,第一天股票漲停,第二天成交量是第一天成交量的1倍,並超過10%.那第三天就是買點w1:=ref(c,2)/ref(c,3)>1.1;w2:=ref(v,1)/ref(v,2)>2;xg:w1 and w2;104,放量2倍突破300日線的選股指標cross(c,ma(c,300)) and v>ref(v,1)*2;105,3日均線上穿10日均線,KDJ有效金叉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;w1:=cross(ma(c,3),ma(c,10));xg:w1 and cross(k,d);106,30日均線拐頭向上ma(c,30)>ref(ma(c,30),1);107,連續3-5天,每天的收盤價漲跌幅不超過1%.w1:abs(c-o)<0.01;xg:count(w1,5)>=3;108,K線收十字星abs(c-o)/o<0.01;109,MACD在8天以內兩次金叉DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));DEA:=EMA(DIFF,9),COLORBLUE,LINETHICK0;MACD:=2*(DIFF-DEA);w1:cross(DIFF,dea);xg:count(w1,8)>=2;110,昨天升降幅在-n%----n%之間w1:abs(ref(c,1)-ref(c,2))/ref(c,2)*100<n;111,於20日均線相差2個百分點的w1:abs(c-ma(c,20)/ma(c,20)*100<2;N日均線相差M個百分點的公式.w1:abs(c-ma(c,n)/ma(c,n)*100<m;n:N日 m:M個百分點112,60MA由向下調頭向上ma(c,60)>ref(ma(c,60),1);113, 股價回調到14日均線的選股abs(c-ma(c,14))/ma(c,14)<0.005;114,歷史第5根K線到第30根K線之間的最高價hhv(ref(c,5),25);115,MACD的拐點公式DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));DEA:=EMA(DIFF,9),COLORBLUE,LINETHICK0;MACD:=2*(DIFF-DEA);拐點:ref(macd,2)>ref(macd,1) and ref(macd,1)<macd;116,跳空高開收陽線LOW>REF(HIGH,1) and c>o;117,漲停過300日線的選股公式c/ref(c,1)>1.09 and cross(c,ma(c,300));118,成交量是前5天中其他任何一天的10天均量線的3.5倍以上w1:=llv(ma(v,10),5);xg:v>w1*3.5;119,股價N天內連續沿著5天線走,且每天收盤價與5天線的距離不超過2%的選股公式w1:=abs(c-ma(c,5))/ma(c,5)<0.02;xg:count(w1,n)=n;120,跳空高開後,三天內沒有回補缺口ref(LOW,2)>REF(HIGH,3) and l>ref(LOW,2);121,日漲幅小於3%C>0 AND C/REF(C,1) >1.03;122, 股價創30個交易日的新高H>ref(H,30);123,連續n天收陽線UP:=CLOSE>OPEN;COUNT(UP,N)=N;124, {5日內第二大量}zdl:=hhv(v,5);v0:=IF(v>=zdl,0,v);v1:=IF(ref(v,1)>=zdl,0,ref(v,1));v2:=IF(ref(v,2)>=zdl,0,ref(v,2));v3:=IF(ref(v,3)>=zdl,0,ref(v,3));v4:=IF(ref(v,4)>=zdl,0,ref(v,4));第二大量:MAX(MAX(MAX(MAX(v0,v1),v2),v3),v4);DRAWTEXTABS( 0,10 ,"第一大量 "+ zdl+" 第二大量"+第二大量);同理可求出第三大、第四大和最小量.實行簡單的排列.這個公式好比是一件完整產品中的一個零部件,解決了一個思路問題.125,{5日均線傾角大於60度}X:(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926)>60;126,連續三漲停A:=C/REF(C,1)>1.095;XG:EVERY(A,3);127,30日線開始上翹MA30:MA(C,30);(MA30>REF(MA30,1)) AND (REF(MA30,1)<=REF(MA30,2));128,當收盤價大於10均線時,主圖背景是黃色的,小於的時候是綠色的ma10:=ma(c,10);DRAWGBK(c>=ma10),colorred;DRAWGBK(c<ma10),colorgreen;129,日漲幅小於3%C>0 AND C/REF(C,1) >1.03;130,股價創30個交易日的新高H>ref(H,30)131,3根陽線,並且第二根陽線的量比第一根小,第三根的量比第二根小EY:=CLOSE>OPEN;ZL:=VOL<REF(VOL,1);XG:SUM(EY,3)=3 AND SUM(ZL,3)=3;或者這樣:EY:=CLOSE>OPEN;ZL:=VOL<REF(VOL,1);XG:COUNT(EY,3)=3 AND COUNT(ZL,3)=3;132,昨天的量為陰量,或昨天量比前天量要小(縮量)SL:REF(VOL,1)<REF(VOL,2) AND REF(CLOSE,1)<REF(OPEN,1);133,只要交換金叉時均線前後的位置,就變成死叉的寫法了:死叉:CROSS(MA(C,10),MA(C,5));134,macd後金叉高於前金叉:DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);JC:=CROSS(DIFF,DEA)AND DEA<0;JJ:=BARSLAST(JC);QC:=CROSS(DIFF,DEA)AND COUNT(JC,30)=2;REF(DEA>REF(DEA,JJ),1)AND QC;REF(DEA<REF(DEA,JJ),1) AND QC;135,計算N日均線斜率:JX:=REF(EMA(C,N),1);斜率:(EMA(C,N)-JX)/JX*100;136,開盤N小時內,股價一直大於均價:IF(OPENMINUTES(HOUR<N),C>DYNAINFO(11),0);137,N天內跌幅超過X:N:=20;X:=30;IF(SUM((1-C/REF(C,1))*100,N)>X,1,0);138,macd二次金叉:DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);JC:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));//首先界定金叉條件:選股:CROSS(DIFF,DEA) AND DEA<0 AND JC=2; //定位金叉的次數:139,M天內、曾經N次漲停:連續漲停:=COUNT(C/REF(C,1)>1.099,N)=N;所有個股:COUNT(連續漲停,M)=1;140,N天內跌幅超過X:N:=20;X:=30;IF(SUM((1-C/REF(C,1))*100,N)>X,1,0);141,2陽夾1陰REF(C,2)>REF(O,2) AND REF(C,1)<REF(O,1) ANDC>O AND C>=REF(O,1);142,昨天大漲今收陰十字星大於昨收盤:昨天大漲:=REF(C,1)/REF(C,2)>1.05;陰十字星:=H/L>1.015 AND O>C AND H>O AND C>L AND O/C<1.005;大於昨收盤:=C>REF(C,1);選股:昨天大漲 AND 陰十字星 AND 大於昨收盤;143,全天漲停:全天漲停:(LOW>REF(HIGH,1)) AND (HIGH=LOW);144,跳空高開的選股公式o>ref(h,1);145,{靠近年線}a1:(c-ma(c,250))/ma(c,250);0;146,10日內的K線實體的幅度(不管是陰是陽)全部小於3%的選股公式:選:count((abs(c-o)/min(c,o)*100)<3,10)=10;147,公式條件:1.換手率大於3%;2.量比大於2倍;3.現價小於10元;4.流通盤小於2億股;5.每股收益大於0.1元;6.漲幅大於3%;7.MACD的DIFF上穿DEA,金叉;X1:=DYNAINFO(37)>0.03;X2:=DYNAINFO(17)>2;X3:=C<10;X4:=CAPITAL/1000000<2;X5:=FINANCE(33)>0.1;X6:=(C-REF(C,1))/REF(C,1)>0.03;X7:=CROSS(MACD.DIF,MACD.DEA);XG:X1 AND X2 AND X3 AND X4 AND X5 AND X6 AND X7;148,股價漲停.在K線圖上畫黃色STICKLINE(C/REF(C,1)>=1.099,O,C,1,0),COLORYELLOW;149,今收盤對於N日內最低收盤價的漲幅(%)(C-LLV(C,N))/LLV(C,N)*100;150,今收盤對於N日內最高收盤價的跌幅(%)(HHV(C,N)-C)/HHV(C,N)*100;151,股價在過去N日內運行空間的相對位置(C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100;152,股價上方N1%至N2%處的籌碼(%)AA:=WINNER(C+C*N2/100)*100;BB:=WINNER(C+C*N1/100)*100;AA-BB153,股價下方N1%至N2%處的籌碼(%)(WINNER(C-C*N1/100)-WINNER(C-C*N2/100))*100;154,收盤價N%處的套牢盤100-(WINNER(C*N/100))*100;155,收盤價N%處的獲利盤WINNER(C*N/100)*100;156下影線(MIN(C,O)-L)/(H-L);157,上影線(H-MAX(C,O))/(H-L)158,本周期的漲跌幅(C-REF(C,1))/REF(C,1)*100;159,振幅(H-L)/L*100;160,均線金叉CROSS(MA(C,N),MA(C,M));{N< M}161,均線死叉CROSS(MA(C,M),MA(C,N));{N< M}162,均線多頭排列A1:=MA(C,N1);A2:=MA(C,N2);A3:=MA(C,N3);A4:=MA(C,N4);COUNT(A1>A2 AND A2>A3 AND A3>A4,3);163,均線空頭排列A1:=MA(C,N1);A2:=MA(C,N2);A3:=MA(C,N3);A4:=MA(C,N4);COUNT(A1< A2 AND A2< A3 AND A3< A4,3);164,N日均線向下AA:=MA(C,N);BB:=REF(AA,1);AA< BB165,N日均線向上AA:=MA(C,N);BB:=REF(AA,1);AA>BB166,N日均線走平AA:=MA(C,N);BB:=REF(AA,1);AA=BB167,向前N日至M日出現過均線死叉(P1< P2)AA:=MA(C,P1);BB:=MA(C,P2);CC:=REF(CROSS(BB,AA),N);COUNT(CC,M);168,今日成交量大於N日以來的均量VOL>MA(VOL,N);169,低位密集A1:=COST(85);A2:=COST(15);A3:=A1-A2;A4:=(A1+A2)/2;A5:=A3/A4*100<10;B1:=HHV(H,120);B2:=LLV(L,120);B3:=B1-B2;B4:=(A4-B2)< B3/2;A5 AND B4;170,換手率VOL/CAPITAL*100171,N日盈虧V1:=VOL/SUM(VOL,N);V2:=DMA(CLOSE,V1);V3:(CLOSE-V2)/V2*100;172,均線粘合:設均線為a1,a2,a3ff:=max(max(a1,a2),a3);bb:=min(min(a1,a2),a3);zz:=(ff/bb-1)*100<1;count(zz,3)=3;173,連續3漲停COUNT(c/ref(c,1)>1.094 ,4)=4;174,大智慧公式短語1間隔點:20,colorred,pointdot,linethick2;80,colorred,pointdot,linethick2;50,colorred,pointdot,linethick2;2間隔線20,colorred,linethick2;80,colorred,linethick2;50,colorred,linethick2;3信號字DRAWTEXT(RSI1<10,RSI1,"買"),Colorlime;DRAWTEXT(RSI1>85,RSI1,"賣"),Colorlime;4笑哭臉DRAWICON(VR24<25,VR24,1),ColorFF0000;DRAWICON(VR24>350,VR24,2),ColorFF0000;5一線提示cross("kdj.j"(9,3,3),"kdj.d"(9,3,3)) and "kdj.j"(9,3,3)<20,colorred6一柱頂天IF(VAR4=50,50,0),stick,linethick2;7小人作怪多頭卒:Var3,LINETHICK2, COLORf00ff0;空頭卒:Var4,LINETHICK2, COLORYELLOW;DRAWICON(Var9,Var9,1);DRAWICON(Var10,Var10,2);8小人買入:Var1 AND Var2,stick,linethick2,colorred;賣出:CROSS(80,Var4),stick,linethick2,colorgreen;drawicon(賣出,1.1,2);drawicon(買入,1.1,1);如何自己寫股票條件選股公式源碼寫公式其實很簡單,只是看不懂的人比較複雜而已,比如昨天收盤價大於今天收盤價,公式就是REF(C,1)>C,其中ref(c,1)就是昨天收盤價,c就是收盤價,如果把c改成o,o是開盤價,那麼ref(o,1)就是昨天開盤價,括弧裡面還有一個1字,1表示向前一天的意思,如果把它改成2,那麼就是前天也就是往前兩天的意思。寫公式的函數各個軟體都不一樣,但都差不多,而且你每點一下函數軟體上都有解釋函數的用法解釋。再舉個例子一隻股票漲停板了,要選出漲停板的股就是c>=ref(c,1)×0.1+ref(c,1)其中0.1是百分之十的意思就是10÷100=0.1的意思,c是今天的收盤價、或者說是現價。整句意思就是說現價大於或等於昨天收盤價的百分之10加上昨天收盤價,用數據來打個比方:昨天收盤價是10元,那麼整個算式是這樣的:c(現在價錢)要大於或等於10×0.1+10.也就是C>=11.有些漲停板達不到百分之十(四捨五入)有些只有百分之9.8,那麼這時候就要將0.1改成0.098才能將所有漲停板的股票都找出來。初學者可以先用最簡單的方法寫好了就測試,比如c=10,那麼選出來的都是股價等於10塊錢的。條件選股只能是一個輸出比如下面這個簡單的公式:A1:=MA(CLOSE,5);{5日均線}A2:=MA(CLOSE,10);{10日均線}A3:=MA(CLOSE,30);{30日均線}B1:=A1>REF(A1,1);{5日均線往上翹}B2:=A2>REF(A2,1);{10日均線往上翹}B3:=A3>REF(A3,1);{30日均線往上翹}AA:=A1>A2 AND A2>A3{多頭排列也就是說5日線在10日線之上和10日線在30日線之上}XG:AA AND B1 AND B2 AND B3;{這句是總結上面所有需要輸出的意思}這公式中上7行中都有個『=』號這個等於號是不輸出的意思,如果都去掉了就會出現軟體提示「條件選股只能一個輸出」的字眼。記住開頭冒號,結尾分號。好了說到這裡你應該會做簡單的條件選股公式了吧?會簡單的寫公式然後照著思路慢慢研究更深層的公式吧。
轉發至微博閱讀(945)| 評論(0)|
用微信「掃一掃」將文章分享到朋友圈。
用易信「掃一掃」將文章分享到朋友圈。喜歡 推薦 0人| 轉載一步一步做發糕
推薦閱讀:
※凈空法師:能看懂佛經至少要具備三個條件,真誠心、恭敬心、不著相
※論財運斷語的使用條件
※幾種實用的條件選股公式
※具備這8個條件做演員你才合格!
※凈空法師:學凈宗想成就需三個特殊條件