(3)今天的成交量达到了整个流通盘的2%以上: VOL/CAPITAL>2/100; 注意,10%的表达式是10/100,或者0.1 6、缩量:
(1)今日比昨日的成交量缩小了1倍: VOL/REF(VOL,1)<0.5; (2)今日的五日均量比前五天的五日均量缩小了一半: AA:=MA(VOL,1)<0.5; BB:=REF(AA,5); AA/BB<0.5;
(3)今天的成交量不足整个流通盘的0.5%: VOL/CAPITAL<0.5/100; 7、放量上攻 是指价格上扬,成交量剧增
C/REF(C,5)>1.2 AND VOL>MA(VOL,5)*3; 表示5日上涨20%和成交量超过5日均量的3倍。
8、持续放量:COUNT(V>REF(V,1),N)=N; 实际上这种情况不是很多。如果用3日均量,或5日均量则非常普遍。即:COUNT(MA(V,3)>REF(MA(V,3),1),N)=N; 9、阶段放量
N(1,100,10) M(1,100,50)
SUM(VOL,N)/CAPITAL>=(M/100) N日内换手率大于百分之M 代入参数后的表达式为:SUM(VOL,10)/CAPITAL>=5/10; 或者:SUM(VOL,10)/CAPITAL*100>50; 10、温和放量上攻 M(2,10,3) N(1,40,10)
UP:=MAX(C,O)>REF(MAX(C,O),1); A:=VOL>REF(VOL,1);
COUNT(IF((UP AND A),1,0),N)=N AND C>O
AND (C-REF(MAX(C,OPEN),1))/REF(MAX(O,C),1)<=(3/100) AND VOL/CAPITAL<=(M/100)
连续N个周期放大并保持上涨势头 当日换手率小于 M% 11、突然放量
N(1,300,10)M(1,40,3)
VOL>REF(HHV(VOL,N),1)*M
成交量较前N周期的最大成交量增大M倍
12、上涨: C/REF(C,1)>1.07;今日涨幅达到了7%以上。 注意:涨幅是指当天收盘价与昨天的收盘价之比。
13、下跌: 同上面的表达方式一样,将方向改变了而已。 14、十日均价继续上涨: AA:=MA(C,10); BB:=REF(AA,1); AA>BB;
15、窄幅整理:就是指近一段时期价格维持在一定幅度之内
(HHV(C,20)-LLV(C,20))/C<0.08 ;即20日内价格振幅在8%以内波动。 16、连续N天收阳:COUNT(C>O,N)=N;
特别提示:新函数:COUNT(X,N),统计满足条件的周期数。若N=0则从第一个有效值开始。
例:COUNT(C<=3;时,即加上条件“小于等于3”周期时,才有实际意义。这个函数经常用到,务请留意。 17、N日内阳线多于阴线:COUNT(C>O,N)>N/2; 18、创历史新高:C=HHV(C,0);
特别提示:此公式本应为:C=HHV(C,N); 当N等于0时,从第一天开始统计。统计历史数据时,如果从头开始,都用0。
19、尾盘拉升
HOUR>14 AND MINUTE>56 AND CLOSE/REF(CLOSE,2) >= 1+N/100
14:56以后2分钟涨幅超过N% 20、突破长期盘整 N(10,60,30) M(5,50,30)
REF(((HHV(H,N)-LLV(L,N))/LLV(L,N)),1)<=(M/100)AND C>=REF(HHV(H,N),1) AND BARSCOUNT(C)>N 前N日在上下M%的幅度内整理,今日突破。 21、阶段强势股
N(700101,1341231,990519) M(700101,1341231,990913) A:=SUM(IF(DATE-N=0,INDEXC,0),0); B:=SUM(IF(DATE-M=0,INDEXC,0),0); E:=SUM(IF(DATE-N=0,C,0),0); F:=SUM(IF(DATE-M=0,C,0),0); ((F-E)/E)>((B-A)/A)
选择N日----M日之间内走势强于大盘的股票. 22、大盘同步选股 N(1,100,10)M(1,100,50)
COUNT((C>O AND INDEXC>INDEXO) OR (C< O AND INDEXC< INDEXO),N)/N > M/100 N周期中与大盘走势相同(同收阴线或同收阳线)的比例超过M% 23、今收盘对于N日内最低收盘价的涨幅(%) (C-LLV(C,N))/LLV(C,N)*100;
24、今收盘对于N日内最高收盘价的跌幅(%) (HHV(C,N)-C)/HHV(C,N)*100;
25、股价在过去N日内运行空间的相对位置 (C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100; 26、股价上方N1%至N2%处的筹码(%) AA:=WINNER(C+C*N2/100)*100; BB:=WINNER(C+C*N1/100)*100; AA-BB
认识新函数:WINNER(CLOSE) 获利盘比例。表示以当前收市价卖出的获利盘比例,如返回0.2表示20%获利盘;例如:WINNER(10) 表示10元价格的获利盘比例。该函数仅对比较日线分析周期有效。 27、股价下方N1%至N2%处的筹码(%)
(WINNER(C-C*N1/100)-WINNER(C-C*N2/100))*100; 28、收盘价N%处的套牢盘 100-(WINNER(C*N/100))*100; 29、收盘价N%处的获利盘 WINNER(C*N/100)*100;
三、基本面选股举例
1、小盘选股
CAPITAL<=500000 AND FINANCE(33)>=0.01 AND CLOSE<=30 2、低市盈率选股
DYNAINFO(39)<=N AND DYNAINFO(39)>0 3、业绩选股 N(0,100,0.4)
FINANCE(33)>N 每股收益在0.4元以上 4、小盘股 N:=5000;
FINANCE(7)<=N
5、大盘股 N:=20000;
FINANCE(7)>=N 线上阴
MA34:=MA(C,34); MA18:=MA(C,18);
线上阴18:COUNT(LONGCROSS(C,MA18,20),10)>=1 AND EVERY(C>MA18,2) AND CREF(C,1)*0.97;
一阳穿线1
CLOSE >MA(C,5)
AND CLOSE >MA(C,10) AND CLOSE>MA(C,20) AND OPEN
AND MA(C,10)>REF(MA(C,10),1) AND MA(C,5)>MA(C,10); 一阳穿线2
MA5:=MA(C,5); MA10:=MA(C,10); MA30:=MA(C,30); 低:=REF(C,1)
高:=CROSS(C,MA5) AND CROSS(C,MA10) AND CROSS(C,MA30); 一阳穿线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; 。这些基本语句,是编写公式和整理选股公式信号的基础,大家要熟知。 通达信精准选股公式2 条件选股公式源码: 一招就够
V1:=EMA(CLOSE,5);
V2:=EMA(EMA(CLOSE,29)*1.01,10); CROSS(V1,V2); 黑马易找
VAR1:=MA(CLOSE,5); VAR2:=MA(CLOSE,10); VAR3:=MA(CLOSE,30); VAR4:=MA(CLOSE,60); VAR5:=EMA(COST(85),7); VAR6:=EMA(COST(15),7);
VAR7:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4); VAR8:=INTPART(VAR7*100)/100;
VAR9:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7); VARA:=INTPART(VAR9*100)/100;
VARB:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28); VARC:=INTPART(VARB*100)/100;
VARD:=EMA(CLOSE,5)-EMA(CLOSE,10); VARE:=EMA(VARD,9);
VARF:=(-100)*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5))+100; VAR10:=(-100)*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10))+100;
VAR11:=(-100)*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20))+100; VAR12:=(-100)*(HHV(CLOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30))+100; VAR13:=REF(VARE,1); VAR14:=VARE;
VAR15:=VAR14-VAR13; VAR16:=REF(VARD,1); VAR17:=VARD;
VAR18:=VAR17-VAR16; VAR19:=OPEN; VAR1A:=CLOSE;
黑马易找选股: VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC AND VAR15>0 AND VAR18>0;
以逸待劳
VAR1:=COST(10);
VAR2:=REF(CLOSE,7)/MA(REF(CLOSE,7),3)>=1.07 AND REF(CLOSE,7)=HHV(REF(CLOSE,7),3) AND MA(REF(VOL,7),2)/MA(REF(VOL,7),40)>=3 AND MA(REF(VOL,7),2)=HHV(MA(REF(VOL,7),2),3) AND REF(VOL,7)>REF(REF(VOL,7),1) AND REF(CLOSE,7)>REF(REF(CLOSE,7),1); VAR3:=REF(REF(CLOSE,7),1);
VAR4:=SMA(MAX(REF(CLOSE,7)-VAR3,0),5,1)/SMA(ABS(REF(CLOSE,7)-VAR3),5,1)*100; VAR5:=COUNT(VAR4<20,20)>=1;
VAR6:=(INDEXC-LLV(INDEXL,89))/(HHV(INDEXH,89)-LLV(INDEXL,89))*100; VAR7:=SMA(VAR6,8,1); VAR8:=SMA(VAR7,10,1); VAR9:=REF(INDEXC,1);
VARA:=SMA(MAX(INDEXC-VAR9,0),6,1)/SMA(ABS(INDEXC-VAR9),6,1)*100;
VARB:=VARA>=75 AND VARA<90 AND VAR7>VAR8 AND BARSLAST(CROSS(VAR7,VAR8))<=21; VAR2 AND VAR5 AND VARB;
资金进场
A1:=DYNAINFO(6);
A2:=IF(LOW>A1,0,IF(HIGH 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; A11:=IF(FILTER(A8,3),5,0); 资金进场日:A11>0,8;
条件选股公式:黑马二号 (黑马一号改进) 缺省周期:日线 参数描述: N(1,100,45)M1(2,40,2)M2(2,40,5)M3(1,30,5)
Var1:=(HHV(CLOSE,26)-LLV(CLOSE,26))/SUM(ABS(CLOSE-REF(CLOSE,1)),26); Var2:=MA(Var1,7);
Var3:=EMA(EMA(EMA(CLOSE,12),12),12); Var4:=(Var3-REF(Var3,1))/REF(Var3,1)*100; Var5:=MA(Var4,15);