通达信公式 下载本文

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 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 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) 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

129,日涨幅小于3%

c>0 aND c/REF(C,1)>1.03;

130,股价创30个交易日的新高

h>ref(H,30)

131,3根阳线,并且第二根阳线的量比第一根小,第三根的量比第二根小 eY:=CLOSE>OPEN; zL:=VOL

xG:SUM(EY,3)=3 aND sUM(ZL,3)=3; --------------------- 或者这样:

eY:=CLOSE>OPEN; zL:=VOL

xG:COUNT(EY,3)=3 aND cOUNT(ZL,3)=3;

132,昨天的量为阴量,或昨天量比前天量要小(缩量) sL:REF(VOL,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

135,计算N日均线斜率: jX:=REF(EMA(C,N),1);

斜率:(EMA(C,N)-JX)/JX*100;

136,开盘N小时内,股价一直大于均价: iF(OPENMINUTES(HOURDYNAINFO(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) c>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-BB

153,股价下方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)