选股公式自己写

合集下载

成本均线多头选股公式

成本均线多头选股公式

成本均线多头选股公式{成本均线}{参数 N:1,50,20; N1:1,20,7; N2:1,100,79}JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);M1:=EMA(CLOSE,5);M2:=EMA(CLOSE,8);持股区域:=STICKLINE(A>B,A,B,2,0);持币区域:=STICKLINE(A<B,A,B,2,0);生命线21:=MA(CLOSE,21);决策线60:=MA(CLOSE,60);控盘线13.333:=MA(CLOSE,40/3);平均成本线:=COST(50);VAR2:=1/WINNER(CLOSE);VAR3:=MA(CLOSE,40/3);VAR4:=100-ABS((CLOSE-VAR3)/VAR3*100);VAR5:=LLV(LOW,75);VAR6:=HHV(HIGH,75);VAR7:=(VAR6-VAR5)/100;VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);VAR9:=SMA((OPEN-VAR5)/VAR7,20,1);VARA:=3*VAR8-2*SMA(VAR8,15,1);VARB:=3*VAR9-2*SMA(VAR9,15,1);VARC:=100-VARB;持仓:=IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),DRAWNULL); 空仓:=IF(CLOSE<=SAR(4,2,20),SAR(4,2,20),DRAWNULL);标识1:=STICKLINE(C/REF(C,1)>1.095,O,C,1.5,0);看实力:=(100-VARA);散户:=MA(WINNER(CLOSE*0.95)*100,3);新庄:=(100-IF(VAR2>5,IF(VAR2<100,VAR2,VAR4-10),0));VARD:=散户>VAR4;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;VAR11:=EMA(VAR10,30);VAR12:=CLOSE-REF(CLOSE,1);VAR13:=MAX(VAR12,0);VAR14:=ABS(VAR12);VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;VAR17:=BARSCOUNT(CLOSE);VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;VAR21:=(HIGH+LOW+CLOSE)/3;VAR22:=(VAR21-MA(VAR21,14))/(0.015*AVEDEV(VAR21,14));VAR23:=(VAR21-MA(VAR21,70))/(0.015*AVEDEV(VAR21,70));VAR24:=IF(VAR22>=150 AND VAR22<200 AND VAR23>=150 AND VAR23<200,10,0);VAR25:=IF(VAR22<=-150 AND VAR22>-200 AND VAR23<=-150 AND VAR23>-200,-10,VAR24);断子绝生:=IF(VAR23>=200 AND VAR22>=150,15,IF(VAR23<=-200 AND VAR22<=-150,-15,VAR25))+50;标识2:=DRAWICON(VARD,HIGH,2);标识3:=DRAWTEXT(VAR20,C,'★'),COLORYELLOW;标识4:=DRAWTEXT(CROSS(VAR20,0.5) AND COUNT(VAR20=1,10)=1,C*1.01,'抄底');标识5:=DRAWTEXT(CROSS(VARD,0.5) AND COUNT(VARD=1,10)=1,HIGH*1.01,'我走啦');VAR26:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;VAR27:=REVERSE(VAR26);VAR28:=SMA(VAR26,3,1);波段王:=SMA(VAR28,3,1);波段鬼:=SMA(波段王,3,1);地狱:=DRAWICON(CROSS(波段王,波段鬼) AND 波段王<40,LOW,1);天堂:=DRAWICON(CROSS(波段鬼,波段王) AND 波段鬼>75,HIGH,2);标识6:=DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,LOW*0.95,'波段');标识7:=DRAWTEXT(CROSS(波段鬼,波段王) AND 波段鬼>75,HIGH*1.02,'减磅');附加1:=DRAWTEXT_FIX(1,0.03,0.16,0,'所属板块:');附加2:=DRAWTEXT_FIX(1,0.10,0.16,0,HYBLOCK);附加3:=DRAWTEXT_FIX(1,0.165,0.16,0,DYBLOCK);AL:=SUMBARS(V,CAPITAL*1);AL1:=SUM(COST(10),AL)/AL;AL2:=SUM(COST(20),AL)/AL;AL3:=SUM(COST(30),AL)/AL;AL4:=SUM(COST(40),AL)/AL;AL5:=SUM(COST(50),AL)/AL;庄家成本:=(5*AL1+4*AL2+3*AL3+2*AL4+1*AL5)/15;选股:CROSS(REF(CLOSE,0),REF(控盘线13.333,0)) AND CROSS(REF(CLOSE,0),REF(庄家成本,0)) AND REF(CLOSE,0)>=平均成本线;。

东方财富编辑公式

东方财富编辑公式

东方财富编辑公式摘要:1.东方财富公式编辑简介2.东方财富选股公式示例3.公式编写技巧与注意事项4.总结正文:东方财富是一款热门的股票投资软件,其功能丰富,包括公式编辑器在内。

通过编写选股公式,投资者可以更加便捷地筛选出符合自己投资策略的股票。

本文将介绍如何编写东方财富选股公式,以及一些实用的公式示例。

一、东方财富公式编辑简介东方财富的公式编辑器位于分析菜单栏中的公式管理器。

用户可以在此处新建、导入、修改和测试选股公式。

需要注意的是,部分公式在其它股票软件(如通达信)中也可用,但并非完全通用。

此外,东方财富的公式编写没有特定的语法规则,主要依赖于逻辑和表述清晰。

二、东方财富选股公式示例1.均线交叉选股公式:XG: MA(C, 5) AND C > MA(C, 10) AND C > O;2.三十日均线上穿一百日均线选股公式:AA: (C - REF(C, 1)) / REF(C, 1) > 7;BB: LAST(C - REF(C, 2)) / REF(C, 2) > 5)2;AA OR BBAND H > HHV(REF(H, 1), 60);3.成交量放大选股公式:T: 3;ZD: (C - REF(C, 1)) / REF(C, 1) > 100;A: FILTER(EXIST(ZD > 9.7, T) AND SUM(ZD, T4) < -5, 5);三、公式编写技巧与注意事项1.结合自身投资策略编写公式,提高选股效率。

2.适当调整公式中的参数,以优化选股结果。

3.编写公式时,注意逻辑清晰,表述简洁。

4.定期测试和优化公式,以适应市场变化。

四、总结东方财富的选股公式编写功能为投资者提供了便利,通过编写合适的公式,可以迅速找到符合自己投资需求的股票。

然而,投资者也需要不断学习和实践,以掌握公式编写技巧,提高选股能力。

条件选股公式的编写

条件选股公式的编写

条件选股公式的编写】对于改写选股公式特发虎年学习贴-----终结篇(也就是高级篇)!!!!!2011-01-28 14:42:51| 分类:公式收集| 标签:|字号大中小订阅对于改写选股公式特发虎年学习贴-----终结篇(也就是高级篇)!!!!!一、条件选股公式的编写什么是条件选股?简单讲,就是按照您设定的条件用电脑帮助您完成一些太多太复杂的挑选--比如您有一些好的心得和方法,可是有1300多只股票,您就是有100双眼睛有时也不一定可以看得过来,这时条件选股公式+电脑就派上用场了!编写条件选股公式其实很简单,它是在技术公式的基础上编写而成的,我们还可以将任意一个技术指标公式改写成选股公式。

值得注意的是,选股公式与技术公式的区别是它只有一个返回值,通俗的讲就是选股公式只有一个不带“=”号的语句,其它语句都要有“=”号,否则在测试时会提示\"选股公式必须只有一个返回值\",如图:好了,我们开始建立一个选股公式。

点击”条件选股“选项,选择”新建“,开始编写,写完后给指标起个名字,点击测试通过后保存。

我们举例来说明:{龙行KDJ}RSV:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100; 短K:SMA(RSV,3,1),COLORFF00FF;短D:SMA(短K,3,1),COLORYELLOW;RSV1:=(CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100;长K:SMA(RSV1,5,1),COLORRED;长D:SMA(长K,10,1),COLOR66CC33;18,COLORWHITE;85,COLORBLUE;STICKLINE(短K&gt;短D,短K,短D,4,0),COLORYELLOW; STICKLINE(短K&lt;=短D,短K,短D,4,0),COLORGREEN; STICKLINE(长K&gt;长D,长K,长D,4,0),COLORRED; STICKLINE(长K&lt;=长D,长K,长D,4,0),COLOR669933;上面是《龙行KDJ》技术指标,根据这个指标改编成选股指标。

常用股票选股公式编写范例

常用股票选股公式编写范例

常用股票选股公式编写范例以下指标均来自网络,以此买卖风险自负。

放到这里只是和大家交流选出的股票还需要自己把握筛选;指标只是帮你选股的工具。

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,选股:EXPMA5日与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倍。

史上胜率最高的选股公式,成功率均达85%以上

史上胜率最高的选股公式,成功率均达85%以上

史上胜率最高的选股公式,成功率均达85%以上1、通达信分时指标公式——高抛低吸AAA:=MAX(DYNAINFO(3),DYNAINFO(5));BBB:=MIN(DYNAINFO(3),DYNAINFO(6));CCC:=AAA-BBB;中轨:=(AAA+BBB)/2,COLOR999900;DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*500/EMA(CLOSE,26);DEAA:=EMA(DIFF,9);MACD:=(DIFF-DEAA)/4;STICKLINE(MACD>=REF(MACD,1)AND MACD<=0,中轨,中轨+MACD,2,1),COLOR009999;STICKLINE(MACD>REF(MACD,1)AND MACD>=0,中轨,中轨+MACD,2,1),COLOR0000DD;STICKLINE(MACD<0,中轨,中轨+MACD,2,0)COLORDDDD00;STICKLINE(MACD0,中轨,中轨+MACD,2,0),COLORDDDD00;阻力:BBB+CCC*7/8,COLOR00DD00;支撑:BBB+CCC*1/8,COLOR00DD00;上顶:BBB+CCC*2/3,COLOR999900;下底:BBB+CCC/3,COLOR999900;价:C,COLOR00FFFF;2、竞价量比选股公式lt:=(CAPITAL/100)/10000<=10;ZF:=OPEN/ref(CLOSE,1);A1:=ZF>=1.00 and ZF<1.05;换手:=VOL/CAPITAL*100;换5:=MA(换手,5);涨停:=CLOSE/ref(CLOSE,1)>1.095;TS:=BARSLAST(涨停);QJ:=BETWEEN(TS,1,10);tj:=BARSSINCE(v)+1=1;zq:=BARSLAST(tj);量比:=if(tj,sum(v,0)/DYNAINFO(38)*240,ref(sum(v,0)/DYNAINFO(38 )*240,zq));XG:lt and A1 and ref(换5,1)<3 and 换手>3 and 量比>20;{或:XG:lt and A1 and ref(换5,1)<3 and 换手>3 and QJ and 量比>20;}3、翻倍黑马选股公式MA5:=MA(C,5);MA24:=MA(C,24);均量5:=MA(VOL,5);均量60:=MA(VOL,60);DIFF:=EMA(CLOSE,10)-EMA(CLOSE,20);DEA:=EMA(DIFF,7);MACD:=2*(DIFF-DEA);启动点:IF(CROSS(MA5,MA24) AND 均量5>均量60 AND MACD>0 AND DIFF>DEA,8,0);4、KDJ天下无敌选股公式RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,LINETHICK2;K:=SMA(RSV,M1,1),LINETHICK1;D:=SMA(K,M2,1),LINETHICK1;J:=3*K-2*D,COLORFF00FF,LINETHICK1;COUNT(J<0,8)>=3 AND CROSS(J,1) AND K>=REF(K,1);5、一夜情捕抓涨停黑马指标条件选股源码公式A1:=REF(C,2)>REF(C,3)*1.095 AND REF(C,2)=REF(H,2);A2:=REF(C,1)<REF(O,1)*1.005 AND REF(C,1)*1.02<REF(C,2);A3:=C>REF(C,2) AND C>REF(H,1) AND C>=REF(C,1)*1.095 AND C=H;双响炮:A1 AND A2 AND A3;6、通达信三金叉见底选股公式源码ND :=5;DOWN :=CLOSE/LLV(LOW,60)<=1.2;PMA1 :=MA(CLOSE,5);PMA2 :=MA(CLOSE,10);VMA1 :=MA(VOL,5);VMA2 :=MA(VOL,10);DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);PPDAY :=BARSLAST(CROSS(PMA1,PMA2));YDAY :=BARSLAST(CROSS(VMA1,VMA2));MACDDAY :=BARSLAST(CROSS(DIFF,DEA));三金叉见底:IF((PPDAY<=ND AND DAY<=ND AND MACDDAY<=ND),1,0);7、跟庄建仓选股公式A01:=DYNAINFO(7);A03:=BARSCOUNT(CLOSE);A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);A05:=IF((A03 > 20),A04,0);A06:=IF((LOW > A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));A07:=DMA(A06,(VOL / CAPITAL)) * 60;A09:=IF((((A07 > 0) AND (A07 > REF(A07,1))) AND (A05 <=88)),A07,0);Var3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势:=EMA(Var3,3)-10;机构建仓区:=(A09 > 0 AND (趋势<20 OR 趋势>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 趋势<40,(Var11+Var12),0),3)/618;选股:火焰山>0 AND 机构建仓区>0 AND 趋势>REF(趋势,1) AND REF(趋势,1)<REF(趋势,2);8、分时图当天抓涨停选股公式源码:A1:=(DVOL/C)/2,NODRAW;A2:=SUM(IF(A1>100 AND CLOSE>REF(CLOSE,1),A1,0),0);A3:=SUM(IF(A1>100 AND CLOSE<REF(CLOSE,1),A1,0),0);A4:=SUM(IF(A1<100 AND CLOSE>REF(CLOSE,1),A1,0),0);A5:=SUM(IF(A1<100 AND CLOSE<REF(CLOSE,1),A1,0),0);A6:=A2+A3+A4+A5;机买:(A2/A6)*100,LINETHICK2,COLORRED;机卖:(A3/A6)*100,LINETHICK2,COLORGREEN;散买:(A4/A6)*100,LINETHICK0;散卖:(A5/A6)*100,LINETHICK0;主力差:机买-机卖,LINETHICK2,NODRAW;散户差:散买-散卖,LINETHICK0,NODRAW;DRAWTEXT(主力差>0 AND REF(主力差,1)<=0,C*0.85,'●机构'),COLORRED;DRAWTEXT(主力差<0 AND REF(主力差,1)>=0,-C*0.85,'○机构'),COLORWHITE;DRAWTEXT(散户差>0 AND REF(散户差,1)<=0,C*0.15,'▲散户'),COLORCYAN;DRAWTEXT(散户差<0 AND REF(散户差,1)>=0,-C*0.15,'△散户'),COLORWHITE;9、最简单、最有效的通达信筹码选股公式介入:EXIST(CROSS(COST(50),REF(COST(50),3)),13)AND CROSS(COST(60),REF(COST(60),3))AND (CLOSE-REF(CLOSE,1))*100>3.5AND (WINNER(C)*100)<89;10、低位单峰密集的选股公式MJ:=8;T:=100;A1:=COST(85);A2:=COST(15);A3:=A1-A2;A4:=(A1+A2)/2;A5:=A3/A4*100B1:=HHV(HIGH,T);B2:=LLV(LOW,T);B3:=B1-B2;B4:=(A4-B2)低位单峰密集:A5 AND B4;指标只作参考,不能绝对的准确,但我相信还是比盲目操作的要好吧!具体操作还是看个人的理解,用多了就会有不错的收获了。

编写选股公式教程

编写选股公式教程
牢,学得透,不断探索,不断前进。一花开放不是春,万紫千红春满园。
走势形态特征指标:为了满足大家选股的需要,这里主要介绍股票走势特征、形态特征指标的编制。
走势形态特征指标编制的基础。
(1)放量、缩量(成交量函数为VOL)
A、放量
a.今天成交量较昨天增加了1倍,表示如下:
VOL/REF(VOL,1)>2
{VARC赋值:如果收盘价>昨收,返回成交量(手),否则返回(如果收盘价<昨收,返回0-成交量(手),否则返回0)的历史累和/25000的2日简单移动平均*VAR1}
{点评:在这句用到了VAR1,当VAR1符合条件即:年份>=2034 和 月份>=1时,则VAR1=0,这样以后计算出来的结果全是0,这时该指标便毫无意义了,起到了时间限制的作用。}
选股公式编辑教程大全
技术指标公式用于绘制技术指标线。以KDJ指标为例,右键点击KDJ,选择“编辑公式”后打开公式算法编辑器,显示出KDJ指标公式的内容。
参数名称:最小值,最大值,缺省值
N: 1 10O 9
M1: 2 40 3
M2: 2 40 3
(6)n日内上涨少于下跌(第二天开盘低于前一天收盘)
nt(c>ref(c,1),n)/n<0.5;
注:n为指标参数,可在参数设定范围内设定参数范围。同时可以自由编辑里面的数值(如0.5等 ,达到确定其中比例)。
(7)连续n日收阳线
up:=close>open;
count(up,n)=n;
b.今天成交量较10个交易日平均成交量放大了1倍,表示如下:
a:=ma(vol,10);
Vol/a>2

我的股票池选股公式源码

我的股票池选股公式源码

股票池选股公式:(001)K线昨天收盘是阴线今天是阳线选股公式:XG:C>O AND REF(C,1)<REF(O,1);(002)股价站上10线选股公式:c>ma(c,10);(003)成交均价线:MAN:MA(AMOUNT/V/100,N);(004)今日收盘价站在30日和5日均线上方,且5日均线掉头向上;且成交量比前一日放大一倍以上;且今日收盘是超过8%的阳线。

C>MAX(MA(C,5),MA(C,30)) AND CROSS(MA(C,5),REF(MA(C,5),1)) AND V>REF(V,1)*2 AND C/REF(C,1)>1.08;(005)5日线连续3日走平或向上:count(ma(c,5)>=ref(ma(c,5),1),3);(006)MACD指标源码:LONG,26 SHORT,12 M,9DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA : EMA(DIFF,M);MACD : 2*(DIFF-DEA), COLORSTICK;选出MACD的DIFF、DEA在0轴下,DIFF从下往上交叉DEA的个股:DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA : EMA(DIFF,M);MACD : 2*(DIFF-DEA);DIFF<0 AND DEA<0 AND CROSS(DIFF,DEA);(007)选出外盘小于内盘而股价收阳的个股:DYNAINFO(7)>DYNAINFO(3) AND DYNAINFO(22)>DYNAINFO(23);(008)一阳穿两线:xg: cross(c,ma(c,5)) and cross(c,ma(c,30));(009)连续3-5天,每天的收盘价涨跌幅不超过1%.w1:abs(c-o)<0.01;xg:count(w1,5)>=3;(010)K线收十字星的股票: abs(c-o)/o<0.01;(011)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;(012)MACD上金叉选股公式:日线MACD在0线上方出现金叉,且近10日内涨幅不超过百分之10:DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));DEA:=EMA(DIFF,9),COLORBLUE,LINETHICK0;MACD:=2*(DIFF-DEA);w1:=cross(DIFF,dea);w2:=(c-ref(c,10))/ref(c,10)<0.1;w3:macd>0;w1 and w2 and w3;(013)一阳穿三线:cross(c,ma(c,5)) and cross(c,ma(c,10)) and cross(c,ma(c,20)) ;(014)13日量均线拐头向上:ma(v,13)>ref(ma(v,13),1);(015)60MA由向下调头向上:ma(c,60)>ref(ma(c,60),1);(016)个股价回调到14日均线的选股公式:abs(c-ma(c,14))/ma(c,14)<0.005;(017)跳空高开上涨或跳空下跌发出信号:HIGH<REF(LOW,1) ORLOW>REF(HIGH,1);(018)跳空高开收阳线:LOW>REF(HIGH,1) and c>o;(019)涨停过300日线的选股公式:c/ref(c,1)>1.09 and cross(c,ma(c,300)); (020)今天的开盘价比昨天的收盘价高,并收阳线:c>o and c>ref(c,1);(021)MA20穿MA30;MA20穿MA60;MA20穿120:cross(ma(c,20),ma(c,30)) or cross(ma(c,20),ma(c,60)) or cross(ma(c,20),ma(c,120)) ;(022)股价N天内连续沿着5天线走,且每天收盘价与5天线的距离不超过2%的选股公式:w1:=abs(c-ma(c,5))/ma(c,5)<0.02;xg:count(w1,n)=n;(023)跳空高开后三天内没有回补缺口的公式:ref(LOW,2)>REF(HIGH,3) and l>ref(LOW,2); (024)N 日内,向上跳空缺口未补的选股。

简单的选股指标公式

简单的选股指标公式

/thread-4265511-1-1.html简单的选股指标公式在别的论坛看到的,感觉对选股有一定参考意义,特转载与大家分享。

觉得有用的可加在你自己的选股指标公式中。

发源码: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,选股:EXPMA5日与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倍。

通达信选股最全公式

通达信选股最全公式

通达信选股最全公式.1、通达信选股公式底背离是股票技术分析中的一种重要形态,通达信选股公式中集成了MACD、KDJ、RSI三个指标的底背离。

具体公式如下:DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3 ,3)),1));B2:=REF(C,A2+1)>C ANDREF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) ANDCROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.R SI2"(6,12,24)),1));B3:=REF(C,A3+1)>C ANDREF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));底背离条件是:B1>0 OR B2>0 OR B3>0;2、老鼠仓老鼠仓是指某些股民在掌握了内幕信息后,通过大量买入低价股票来获取利益的行为。

通达信选股公式中,老鼠仓的判断条件如下:AA1:=AMOUNT/VOL;BB1:=L< AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100.1.2;DD1:=L< MA(C,5)*0.921;EE1:=VOL< MA(V,5)*1.5;老鼠仓条件是:BB1 AND CC1 AND DD1 AND EE1;3、抄底高手抄底是指在股票价格低迷时买入,等待价格反弹后卖出获取利润的行为。

强弱分界线选股公式

强弱分界线选股公式

强弱分界线选股公式
强弱分界线选股公式是一种股票筛选方法,可以帮助投资者识别出相对强势和相对弱势的股票。

下面是一个用中文写的强弱分界线选股公式:
1. 计算强弱分界线指标(强弱指数):
强弱指数 = (最高价 + 最低价)/ 2 - 前一交易日的收盘价
2. 筛选强势股:
a. 首先,选择一个时间区间,如20个交易日。

b. 计算每只股票在该时间区间内的强弱指数。

c. 对所有股票的强弱指数进行排序,选取排名前10%的股票。

3. 筛选弱势股:
a. 选择同样的时间区间,计算每只股票的强弱指数。

b. 对所有股票的强弱指数进行排序,选取排名后10%的股票。

通过这个强弱分界线选股公式,投资者可以找到在一段时间内表现较强和相对弱势的股票,作为投资决策的参考。

然而,投资是有风险的,以上公式仅供参考,投资者应结合其他因素进行综合分析和判断。

如何自己编辑选股公式码

如何自己编辑选股公式码

如何自己编辑选股公式码如何自己编辑选股公式码技术指标选股1 均线指标选股普通金叉:函数CROSS(X,Y)的含义从函数表中可以得出为指标线X向上穿过指标线Y。

首先我们用两个中间表达式表达两条指标线X、Y分别为5日均线和10日均线,最终使用CROSS即得。

MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);CROSS(MA5,MA10);MA5和MA10在30日均线之上运动,并当日发生了金叉:“在MA10和MA30之上”,可以简略地描述为“大于”即可,其他的条件套用!所以我们先表达出两个条件分别用AA和CC表示:MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);AA:=CROSS(MA5,MA10);MA30:=MA(CLOSE,30);CC:=MA5&gt;MA30 AND MA10&gt;MA30;将两个综合的条件用逻辑与函数连接成为一个表达式,要注意在条件选股的公式中只能存在一个逻辑判断式,所以AA AND CC;三条均线多头排列由于所谓多头排列没有一个具体的量化的概念,所以需要根据自己平时经验来取得一个比较有效的标准来衡量。

例如我们在下面的公式中的模型是:MA5&gt;MA10&gt;MA30,维持时间3天作为多头排列的定义。

连等或者连续的大于号不可以直接出现在公式组当中,用“AND”将两个连接判断式连接起来!MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA30:=MA(CLOSE,30);CC:=MA5&gt;MA30 AND MA10&gt;MA30;COUNT(CC,3)=3;均线死叉注意CROSS函数使用时两条均线的位置已经颠倒了,思维方式换一下,CROSS(X,Y)本身的含义为X上穿Y,反过来当要表达X向下穿过Y的时候--其实也就是Y向上穿过了X。

CROSS(MA10,MA5)当日成交量放大2倍的金叉成交量放大两倍作为一个辅助条件出现,很多的交易者都习惯用成交量来验证均线走势的可靠性;其中需要量化一点的是,选用一个参照系来描述成交量的变化,我们选用了与上一周期的成交量进行对比的方式。

单阳不破的选股公式

单阳不破的选股公式

单阳不破的选股公式下面这个公式是根据单阳不破的方法和近期股票上涨的特征写出来的,可以减少选股时间,希望能够有所帮助。

A1:=BARSLAST(C/REF(C,1)>1.08);A2:=REF(O,A1);A3:=HHVBARS(V,A1);Q1:=HHV(H,A1)/REF(C,A1)<1.05;Q2:=LLV(C,A1)>A2;Q3:=A1>2 AND A1<10;Q4:=REF(C,A3)>REF(O,A3);Q1 AND Q2 AND Q3 AND Q4;原理:一根涨幅超过8%的阳线开始整理,整理区间不破这根阳线的开盘价,最高涨幅不超过此阳线的5%,整理期间,最大的成交量是阳量。

其中A1<10表示整理时间不超过8天。

选出的股票如下图特征:一、单阳不破形态的基本构成一根大阳线出现后,之后6-7根K线横盘盘整,并且所有的低价都没有击穿该阳线的最低价。

这就是“单阳不破”。

单阳不破形态一旦有效形成,其调整的时间是不会超过8根K线的,通常都会在第6根K线就进入启动器,行情随时拉升。

单阳不破会形成最安全的买点,就是一根带有量的攻击性长阳出现之后,市场人气开始被激发出来。

如果市场回调出现了抗跌特征,就是盘面出现缓跌或跌不动。

市场内在上升力度强劲,那么在回调6-8根K线周期内,就会引发新的暴涨,就算走势失败了,也能顺利出局。

二、单阳不破的技术要点1、单阳不破形态一旦有效成立,其调整的时间不会超过8根K线的,通常运行到第6根K线就进入启动期了,行情随时会拉升。

2、单阳不破形态会形成最安全的买点机会,就是一根带量的攻击性大阳线出现之后,之后7天调整都为跌破其底部,就说明了盘面跌不动市场内的上升力度强劲。

三、单阳不破的强弱分类最强形态:单阳出现之后个股不断创出新高,股价始终都位于单阳实体的1/3以上。

较强形态:单阳之后个股涨跌互现,股价始终都位于单阳实体的1/2以上。

一般形态:单阳之后个股涨跌互现,股价始终都位于单阳实体开盘价以上。

推荐12个高成功率选股公式

推荐12个高成功率选股公式

推荐12个高成功率选股公式,只是为方便大家学习、研讨!感谢大家支持!推荐12个高成功率选股公式之一Var00:=LWINNER(1,CLOSE);Var1:=FORCAST(Var00,10);Var2:=MA(Var1,3);Var3:=MA(Var2,12);Var4:=MA(Var3,16);Var5:=MA(Var4,31);Var6:=MA(Var5,55);Var7:=Var5; Var8:=Var4>Var2*1.11 AND Var3>Var2*1.095;Var9:=Var2>Var1*0.95;Var1h:=INDEXC;Var2h:=MA(Var1h,6);Var3h:=MA(Var1h,24);Var4h:=MA(Var1h,32);Var5h:=MA(Var1h,62);Var6h:=MA(Var1h,105);Var7h:=Var5h; Var8h:=Var4h>Var2h*1.11 AND Var3h>Var2h*1.095;Var9h:=Var2h>Var1h*0.95;pt:=(if(h=l and c=o and l=c and c>0 and ref(h,1)=ref(l,1) and ref(c,1)=ref (o,1)and ref(h,1)=ref(c,1) and ref(c,1)>0,0,1))>0;(Var7h AND Var8h AND Var9h AND CLOSE/COST(8)<=0.7985and (count(c=l,4)<3 or c>ref(c,1)))and pt orVar7 and Var8 and Var9 and CLOSE/COST(5)<=0.8 AND((Var1>OPEN OR Var1>REF(OPEN,1) ORREF(Var1,1)))推荐20个高成功率选股公式之二推荐20个高成功率选股公式之二条件选股公式:BFBZ (20天10%利润,成功率98.52%信号量2209) 缺省周期:日线=========================================================== ============================Var1:=INDEXC;Var2:=MA(Var1,6);Var3:=MA(Var1,24);Var4:=MA(Var1,32);Var5:=MA(Var1,62);Var6:=MA(Var1,105);Var7:=Var5<REF(Var5,1) AND Var6<REF(Var6,1) AND Var5<Var6*0.98; Var8:=Var4>Var2*1.11 AND Var3>Var2*1.095;Var9:=Var2>Var1*0.95;Var7 AND Var8 AND Var9 AND CLOSE/COST(8)<=0.8 AND (CLOSE>O PEN OR CLOSE<OPEN) AND (REF(CLOSE,1)>REF(OPEN,1) OR REF(C LOSE,1)<REF(OPEN,1));推荐20个高成功率选股公式之三条件选股公式:魔鬼组合(99.65% 分析家公式网整理推荐) 缺省周期:日线=========================================================== ============================Var2:=IF(EMA(CLOSE,5)/EMA(EMA(CLOSE,9),16)<=0.85 AND CLOSE/RE F(CLOSE,1)>0.905 AND CLOSE/REF(CLOSE,1)<1.05 AND VOL/CAPITAL *100<5,50,0);Var3:=(-100)*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))+100; Var4:=(-100)*(HHV(HIGH,50)-CLOSE)/(HHV(HIGH,50)-LLV(LOW,50))+100; Var5:=(-100)*(HHV(HIGH,70)-CLOSE)/(HHV(HIGH,70)-LLV(LOW,70))+100; Var6:=((CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100+10)*5;Var7:=((CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100+10)*5;Var8:=((CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100+10)*5;Var9:=(Var3+Var4+Var5+Var6+Var7+Var8)/6;VarA:=EMA(Var9,3);VarB:=ABS(Var6-Var8);VarC:=(Var9+VarB)/2;VarD:=(-1)*(EMA(100*(1-WINNER(CLOSE)),1)-50)+50;VarE:=VarD+VarC;VarF:=IF(Var2>0 AND VarE<0,200,0);Var10:=IF(VarC<0 AND CLOSE=LLV(CLOSE,5) AND CLOSE/REF(CLOSE, 1)>0.905 AND CLOSE/REF(CLOSE,1)<1.05 AND VOL/CAPITAL*100<5,-5 0,0);Var11:=IF(VarE<0 AND Var10=-50,100,0);Var12:=MA(CLOSE,3);Var13:=REF(CLOSE,2)*0.865;Var14:=REF(CLOSE,13)*0.772;Var15:=MIN(Var13,Var14);Var16:=100*VOL/CAPITAL;Var17:=MA(CLOSE,13);Var18:=IF((CLOSE-Var15)/CLOSE<0.03 AND SUM(Var16,5)/5<1.8,1,0);Var19:=IF(Var18>0 AND (Var10<0 OR Var2>0),100,0);Var1A:=Var19;Var1B:=IF(VarF>0 AND Var11>0 AND SUM(VOL/CAPITAL*100,5)/5<1 OR Var18>0 AND REF(CLOSE,1)/REF(CLOSE,2)>0.902 OR (VarF>0 AND Var11>0 AND SUM(VOL/CAPITAL*100,5)/5<1 OR Var18>0) AND (Var10<0 OR Var2>0) AND Var19<10,50,0);Var1C:=(VarF>0 AND Var11>0 AND SUM(VOL/CAPITAL*100,5)/5<1 OR Var18>0) AND (Var10<0 OR Var2>0);Var1D:=VarF>0 AND Var11>0 AND SUM(VOL/CAPITAL*100,5)/5<1 OR V ar18>0 AND REF(CLOSE,1)/REF(CLOSE,2)>0.902;Var1E:=Var1C OR Var1D;g:=MA(CLOSE,80)-MA(CLOSE,10)/3;aaa:=Var1A and CLOSE<g;Var2a:=1;Var3a:=Var2a*(CLOSE-MA(CLOSE,33))/MA(CLOSE,33)*100;bbb:=HHV(CLOSE,13)/CLOSE>1.15 AND HIGH/LOW>1.08 AND CROSS(-30,Var3);Var1bb:=INDEXC;Var2b:=MA(Var1bb,6);Var3b:=MA(Var1bb,24);Var4b:=MA(Var1bb,32);Var5b:=MA(Var1bb,62);Var6b:=MA(Var1bb,105);Var7b:=Var5b<REF(Var5b,1) AND Var6b<REF(Var6b,1) AND Var5b<Var6b *0.98;Var8b:=Var4b>Var2b*1.11 AND Var3b>Var2b*1.095;Var9b:=Var2b>Var1bb*0.95;ccc:=Var7b AND Var8b AND Var9b AND CLOSE/COST(8)<=0.8 AND (CLOSE>OPEN OR CLOSE<OPEN) AND (REF(CLOSE,1)>REF(OPEN,1) ORREF(CLOSE,1)<REF(OPEN,1));Var1cc:=DMA(CLOSE,VOL/MA(VOL,4)/4);Var2c:=DMA(CLOSE,VOL/MA(VOL,33)/33);Var3c:=(CLOSE-Var1cc)/Var1cc*100<-11;Var4c:=(Var1cc-Var2c)/Var2c*100<-22.3;Var5c:=Var3c AND Var4c;ddd:=Var5c AND (OPEN>CLOSE OR OPEN<CLOSE) AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.07 AND(REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1)) AND (REF(OPEN,2)>REF(CLOSE,2) OR REF(OPEN,2)<REF(CLOSE,2)) AND (REF(OPEN,3)>REF(CLOSE,3) OR REF(OPEN,3)<REF(CLOSE,3)) AND (REF(OPEN,4)>REF(CLOSE,4) OR REF(OPEN,4)<REF(CLOSE,4)) AND (REF(OPEN,5)>REF(CLOSE,5) OR REF(OPEN,5)<REF(CLOSE,5)) AND(REF(OPEN,6)>REF(CLOSE,6) OR REF(OPEN,6)<REF(CLOSE,6)) AND (REF(OPEN,7)>REF(CLOSE,7) OR REF(OPEN,7)<REF(CLOSE,7)) ;A1:=INDEXC;A2:=MA(A1,5);A3:=MA(A1,20);A4:=MA(A1,30);B1:=A4>A2*1.08 AND A3>A2*1.055;B2:=A2>A1*1.03;B3:=B1 AND B2;M1:=MA(C,5);M2:=MA(C,10);M3:=M1<M2;N1:=(M1-C)/C>(9/100);N2:=(M2-M1)/M1>0.05;N3:=(H>L*1.07) AND COUNT(H>L*1.04,5)>2;N4:=COUNT(M3,7)>=7;N5:=N1 AND N2 AND N3 AND N4;eee:=B3 AND N5;ff:=(ref(c,32)-close)/ref(c,32)>=0.385;fff:=ccc and ff;Xar1:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);Xar2:=(CLOSE-xar1)/xar1*100+30-(REF(HIGH,13)/CLOSE-1.35)*100;Xar3:=(CLOSE-ref(CLOSE,5))/CLOSE*100<-9;当前获利:=WINNER(CLOSE);大盘涨跌:=ema((INDEXC-ma(INDEXC,10))/INDEXC*100,14)<-4.9;换手率:=(ma(v,5)-VOL)/CAPITAL*100<0.8;量能变化:=(vol-MA(vol,21))/vol*100;买入信号:=大盘涨跌AND Xar3 AND 当前获利<0.12 AND换手率AND 量能变化>18;{飞雪迎春:(Xar2<-8.1 AND 买入信号=1);}{DRAWTEXT(飞雪迎春=1,0.8,'飞雪迎春' );}gg1:=大盘涨跌AND Xar3 AND 当前获利<0.12 AND换手率AND 量能变化>18;ggg:=aaa and gg1;(aaa and bbb) or (aaa and ccc) or (aaa and ddd) or (aaa and eee)or fff or ggg推荐20个高成功率选股公式之四条件选股公式:飞鹰优化(90.87%分析家公式网) 缺省周期:日线=========================================================== ============================Var1:=CLOSE/MA(CLOSE,40)*100<78;Var2:=CLOSE/MA(CLOSE,60)*100<74;Var3:=HIGH>LOW*1.051;Var4:=Var3 AND COUNT(Var3,5)>1;Var4 AND (Var1 OR Var2) andma(c,27)/close>1.169 and ma(c,17)/close>1.158 andclose<ma(c,120) and ma(c,60)<ma(c,120) and ma(c,60)>ma(c,30) and "cci ">-210推荐20个高成功率选股公式之五条件选股公式:BIMOWANG (成功率93.12 信号3736 分析家公式网http://ww 整理) 缺省周期:日线=========================================================== ============================Var1:=EMA(WINNER(CLOSE)*70,3);Var2:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);Var3:=CLOSE/MA(CLOSE,40)*100<76;Var4:=CLOSE/MA(CLOSE,60)*100<74;Var5:=HIGH>LOW*1.051;Var6:=Var5 AND COUNT(Var5,5)>1;Var6 AND (Var3 OR Var4) AND Var2<20 AND Var1<20AND (WINNER(CLOSE*125/100)-WINNER(CLOSE))*100<7.5;推荐20个高成功率选股公式之六条件选股公式:股神选股(20天10利润成功率92.88% 信号量4310 缺省周期:日线=========================================================== ============================参数描述:N(1,30,22)N2(1,10,5)N3(1,5,3)N4(-50,0,-30)=========================================================== ============================Var1:=IF(DATE>=1031231, 0, 1);Var2:=CLOSE<0.980*REF(CLOSE, 1);Var3:=OPEN<REF(CLOSE, 1);Var4:=(CLOSE-REF(CLOSE, 1))/REF(CLOSE, 1)*100*Var1;Var5:=(CLOSE-REF(OPEN, 29))/REF(OPEN, 29)*100*Var1;Var6:=MA(COST(N)/LOW, N3);Var7:=Var6>1.5 AND Var4>N2 AND Var5<N4;Q:Var7 OR (COUNT(Var7, 10) AND Var2 OR COUNT(Var7, 20) AND Va r3)*Var1;推荐20个高成功率选股公式之七原公式加密,以下源码是从网上找的,不知是否与原公式一样,还请高手破解。

选股公式编写思路及讲解

选股公式编写思路及讲解

选股公式编写思路及讲解选股公式是股票投资的重要工具之一,通过一定的数学计算和技术指标分析,帮助投资者筛选出符合自己投资策略的优质股票。

本文将从选股公式的编写思路入手,详细介绍该过程,并解释每一步的原理和作用。

一、选股公式编写思路在编写选股公式之前,我们首先需要明确自己的投资策略和目标。

不同的投资者有不同的投资风格,比如价值投资、成长投资、技术分析等。

根据自己的投资风格选择合适的指标进行分析是非常重要的。

1. 筛选股票类型根据自己的投资策略和目标,确定要筛选的股票类型。

比如,如果你是价值投资者,可以选择筛选出低市盈率、低市净率的股票;如果你是成长投资者,可以选择筛选出高股价增长率的股票。

2. 确定指标根据选择的股票类型,确定需要使用的指标。

常用的技术指标包括移动平均线、相对强弱指数、MACD指标等。

价值投资者可以使用市盈率、市净率等价值指标进行分析。

3. 设置参数根据选择的指标,设置相应的参数。

比如,对于移动平均线指标,可以设置不同的周期来进行比较分析;对于市盈率指标,可以设置一个合理的范围,筛选出符合条件的股票。

4. 编写公式根据选择的指标和参数,编写筛选股票的公式。

可以使用数学运算符、逻辑运算符和函数来编写公式,以实现精准的筛选效果。

二、选股公式讲解以移动平均线为例,详细讲解选股公式的编写和使用方法。

移动平均线是股票技术分析中常用的指标之一,能够平滑股价走势,帮助投资者判断股票的趋势。

下面是一个简单的移动平均线选股公式示例:1. 计算移动平均线值选取股票的收盘价数据,根据设定的周期(如20日、50日)计算移动平均线的值。

移动平均线的计算公式如下:移动平均线 = 前n日收盘价之和 / n2. 判断股票趋势比较当前股票的收盘价与移动平均线的关系,来判断股票的趋势。

一般情况下,如果收盘价大于移动平均线,则为上升趋势;如果收盘价小于移动平均线,则为下降趋势。

3. 附加条件除了移动平均线指标外,可以根据投资者的需要添加其他附加条件,如成交量的变化、技术指标的背离等。

选股公式汇总----源码(一)

选股公式汇总----源码(一)

选股公式汇总----源码(⼀)这⾥这么多⽜指标,供⼤家学习,适合⾃⼰的就是最好的,总有⼏款适合你!三⽇上穿七⽇均价线。

同时三⽇上穿五⽇均量线的选股公式选股:CROSS(MA(C,5),MA(C,10)) AND CROSS(MA(V,3),MA(V,5));5⽇均线拐头向上MA1:=MA(CLOSE,5);向下天数:=COUNT(MA1向下天数>4 AND MA1>REF(MA1,1);5⽇均线⾛平last(between(ma(c,5),ref(ma(c,5),1)*0.998,ref(ma(c,5),1)*1.002))>=3;综合选股:1收盘价连续7天都站在5⽇均线的股票COUNT(C>MA(C,5),7)=7;中阴之后,跳拉阳”c/ref(c,1)>1.05;连续3天收盘全是阴线 COUNT(C20天均线向上的股XG:MA(C,20)>REF(MA(C,20),1);5⽇均线倾⾓⼤于60度X:(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926)>60;跌破股价净值的选股公式[通达信]XG: IF( FINANCE(34)>0.001 , C/FINANCE(34)<1,0);综合选股:255天均线向上的股XG:MA(C,55)>REF(MA(C,55),1);持续放量参数:M 1 100 3EVERY(VOL>=REF(VOL,1),M);综合选股:3持续放量参数:M 1 100 3EVERY(VOL>=REF(VOL,1),M);5⽇均线倾⾓⼤于60度X:(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926)>60;收盘价连续8天都站在5⽇均线的股票c参数:M 3 9 6COUNT(C>MA(C,5),M)=M;综合选股:4阶段放量参数:N 1 100 10 M 1 100 15100*SUM(VOL,N)/CAPITAL>=M;综合选股:5持续放量参数:M 1 10 3EVERY(VOL>=REF(VOL,1),M);"阴转阳"的公式(也就是昨天收阴线,今天收阳线)xg:ref(c,1)o;两阳夹两阴选股指标REF(BARSLAST(C>O),1)=2 ANDC>O;2阳夹1阴选股REF(C,2)>REF(O,2) AND REF(C,1)C>O AND C>=REF(O,1);⾦针探底的选股公式(min(o,c)-l)/(h-l)>2/3 and l收盘价连续6天都站在5⽇均线的股票c参数:M 3 9 6COUNT(C>MA(C,5),M)=M;5⽇均线倾⾓⼤于60度X:(ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*180/3.14115926)>60;60天均线向上的股XG:MA(C,60)>REF(MA(C,60),1);回踩20⽇均线XG:REF(C,1)>MA(C,20) AND CROSS(MA(C,20),C);回踩10均线VAR1:=MA(C,10)>MA(C,20) AND MA(C,20)>MA(C,30) AND MA(C,30)>MA(C,60);VAR2:=MA(C,10)>REF(MA(C,10),1) AND MA(C,20)>REF(MA(C,20),1) AND MA(C,30)>REF(MA(C,30),1) AND MA(C,60)>REF(MA(C,60),1);COUNT(VAR1 AND VAR2,3)=3 AND ABS((MA(C,10)-L)/L)*100<0.3 AND C>MA(C,10);横盘放量突破——抓强势股选股(四次优化)LAST((H-L)/REF(C,1)<0.1,20,0) AND VOL>REF(VOL,1)*2 AND C>REF(C,1)*1.03AND "DMI.PDI">"DMI.MDI" AND CROSS("DMI.ADX","DMI.ADXR")AND"DMI.ADXR">"DMI.MDI" AND "DMI.PDI">"DMI.ADX" AND"KDJ.D">REF("KDJ.D",1);突破在即选股公式⽤以下选股公式可选出即将(或正在)突破前期⾼点的股票,作为第⼆天及其后⼏天的跟踪关注对象。

通达信选股最全公式

通达信选股最全公式

1、通达信选股公式{MACD、KDJ、RSI底背离}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>CANDREF(DIFF,A1+1)<DIFFANDCROSS(DIFF,DEA);A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));B2:=REF(C,A2+1)>CANDREF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3)ANDCROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));B3:=REF(C,A3+1)>CANDREF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24)ANDCROSS("RSI.RSI1"(6,12,24) ,"RSI.RSI2"(6,12,24));底背离:B1〉OORB2>0ORB3〉0;{集成了MACD、KDJ、RSI三个指标的底背离};2、老鼠仓AA1:=AMOUNT/VOL;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=VOL<MA(V,5)*1.5;老鼠仓:BB1ANDCC1ANDDD1ANDEE1;3、抄底高手{M153530N123227D185042}VAR1:=(CLOSE-MA(CLOSE,48))/MA(CLOSE,48)*100+M<0;VAR2:=(CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100+N<0;VAR3:=VAR1ANDVAR2;VAR4:=VAR1ANDVAR2ANDCOUNT(VAR3,2)=1ANDDATE>940101AND(CLOSE>OPENORCLOSE<OPEN)AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.07AND(REF(OPEN,1)>REF(CLOSE,1)ORREF(OPEN,1)<REF(CLOSE,1))AND(REF(OPEN,2)>REF(CLOSE,2)ORREF(OPEN,2)<REF(CLOSE,2))AND(REF(OPEN,3)>REF(CLOSE,3)ORREF(OPEN,3)<REF(CLOSE,3))AND(REF(OPEN,4)>REF(CLOSE,4)ORREF(OPEN,4)<REF(CLOSE,4))AND(REF(OPEN,5)>REF(CLOSE,5)ORREF(OPEN,5)<REF(CLOSE,5));VAR5:=DMA(EMA(CLOSE,8),SUM(VOL,9)/2.8/CAPITAL);VAR6:=(CLOSE-VAR5)/VAR5*100;VAR7:=REF(VAR6,1)+D<0ANDVAR6>REF(VAR6,1)ANDREF(VAR6,1)<REF(VAR6,2)ANDVAR6-REF(VAR6,1)>1.8AND(HIGH>LOW)AND(REF(HIGH,1)>REF(LOW,1))AND(REF(HIGH,2)>REF(LOW,2))AND(REF(HIGH,3)>REF(LOW,3))AND (REF(HIGH,4)>REF(LOW,4))AND(REF(HIGH,5)>REF(LOW,5));VAR4ORVAR7;{K100140100}VAR1:=DMA(CLOSE,VOL/MA(VOL,4)/4);VAR2:=DMA(CLOSE,VOL/MA(VOL,33)/33);VAR3:=(CLOSE-VAR1)/VAR1*100<-11/K*100;VAR4:=(VAR1-VAR2)/VAR2*100<-22.3/K*100;VAR5:=VAR3ANDVAR4AND(OPEN>CLOSEOROPEN<CLOSE)AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.07AND(REF(CLOSE,1)>REF(OPEN,1)ORREF(CLOSE,1)<REF(OPEN,1))AND(REF(OPEN,2)>REF(CLOSE,2)ORREF(OPEN,2)<REF(CLOSE,2))AND(REF(OPEN,3)>REF(CLOSE,3)ORREF(OPEN,3)<REF(CLOSE,3))AND(REF(OPEN,4)>REF( CLOSE,4)ORREF(OPEN,4)<REF(CLOSE,4))AND(REF(OPEN,5)>REF(CLOSE,5)ORREF(OPEN,5)<REF(CLOSE,5))AND(REF (OPEN,6)>REF(CLOSE,6)ORREF(OPEN,6)<REF(CLOSE,6))AND(REF(OPEN,7)>REF(CLOSE,7)ORREF(OPEN,7)<REF(CLO SE,7));VAR6:=DMA(CLOSE,VOL/MA(VOL,3)/3);VAR7:=DMA(CLOSE,VOL/MA(VOL,33)/33);VAR8:=(CLOSE-VAR6)/VAR6*100<-5;VAR9:=(VAR6-VAR7)/VAR7*100<-18;VARA:=(INDEXC-LLV(INDEXL,250))/(HHV(INDEXH,250)-LLV(INDEXL,250))*100;VARB:=SMA(VARA,30,1); VARC:=SMA(VARB,50,1);VARD:=VAR8ANDVAR9AND(OPEN>CLOSEOROPEN<CLOSE)AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.05AND(REF(CLOSE,1)>REF(OPEN,1)ORREF(CLOSE,1)<REF(OPEN,1));VARE:=VARDANDCOUNT(VARD,2)=1;VAR5ORVARE;4、逆势操作VAR1:=DMA(CLOSE,VOL/MA(VOL,4)/4);VAR2:=DMA(CLOSE,VOL/MA(VOL,32)/32);VAR3:=(CLOSE-VAR1)/VAR1*100<-8;VAR4:=(VAR1-VAR2)/VAR2*100<-21;VAR5:=VAR3ANDVAR4AND(OPEN>CLOSEOROPEN<CLOSE)AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.05AND(REF(CLOSE,1)>REF(OPEN,1)ORREF(CLOSE,1)<REF(OPEN,1))AND(REF(OPEN,2)>REF(CLOSE,2)ORREF(OPEN,2)<REF(CLOSE,2))AND(REF(OPEN,3)>REF(CLOSE,3)ORREF(OPEN,3)<REF(CLOSE,3))AND(REF(OPEN,4)>REF( CLOSE,4)ORREF(OPEN,4)<REF(CLOSE,4))AND(REF(OPEN,5)>REF(CLOSE,5)ORREF(OPEN,5)<REF(CLOSE,5))AND(REF(OPEN,6)>REF(CLOSE,6)ORREF(OPEN,6)<REF(CLOSE,6))AND(REF(OPEN,7)>REF(CLOSE,7) ORREF(OPEN,7)<REF(CLOSE,7));VAR6:=(CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100<-23;VAR7:=(INDEXC-LLV(INDEXL,275))/(HHV(INDEXH,275)-LLV(INDEXL,275))*100;VAR8:=SMA(VAR7,50,1);VAR9:=SMA(VAR8,40,1);VARA:=VAR6ANDVAR9<23ANDCOUNT(VAR6,2)=1AND(OPEN>CLOSEOROPEN<CLOSE)ANDOPEN/REF(CLOSE,1)>0.96;(VAR5ORVARA);5、成交量变异率VR买入WVR:=SUM((IF(CLOSE>OPEN,VOL,0)+IF(CLOSE=OPEN,VOL/2,0)),N)/SUM((IF(CLOSE<OPEN,VOL,0)+IF(CLOSE=OPEN,VOL/ 2,0)),26)*100;VOL变异率VR买入:CROSS(LL,WVR);{LL080705};MA5:=MA(C,5);MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);MA120:=SMA(C,120,1);ZH520:=ABS(MA5-MA20)/MA20*100<=10;ZH530:=ABS(MA5-MA30)/MA30*100<=10;QSXS1:=MA5>REF(MA5,1);QSXS2:=MA20>REF(MA20,1);QSXS3:=MA30>REF(MA30,1);DTPL:=MA20>MA30ANDMA30>MA120;LYT:=DTPLANDQSXS2ANDQSXS3ANDCOUNT(QSXS1,4)<=1;GJHS:=C>MA5AND((QSXS1ANDNOT(REF(QSXS1,1)))ORC>REF(C,3));LYKK:=GJHSAND(ZH520ORZH530)ANDLYT;买:LYKKANDNOT(REF(LYKK,1));虚拟成交量〉昨日VOL的2倍的股VVOL:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL);昨日V0L:=REF(V0L,l)*2.0;ABS(VVOL)-昨日VOL>=0;{大于昨日的2.0倍};成交量是昨日的1.8倍VVOL:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL);昨日VOL:=REF(VOL,1)*1.8;ABS(VVOL)-昨日VOL>=0;{大于昨日的1.8倍};6、PDI上穿三线选股公式源码:TR0:=SUM(MAX(MAX(HIGH-L0W,ABS(HIGH-REF(CL0SE,l))),ABS(L0W-REF(CL0SE,l))),14);HD:=HIGH-REF(HIGH,1);LD:=REF(LOW,1)-LOW;DMP:=SUM(IF(HD>0ANDHD〉LD,HD,0),14);DMM:=SUM(IF(LD>0ANDLD〉HD,LD,0),14);PDI:=DMP*100/TR0,colorred;MDI:=DMM*100/TR0;ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);ADXR:=(ADX+REF(ADX,6))/2;CROSS(PDI,MDI)ANDCROSS(PDI,ADX)ANDCROSS(PDI,ADXR)今日量比昨放大1倍后三日股价不跌回当日收盘价的选股公式选股公式:{成交量比前一天放大1倍,后3天,股价没有跌破放量那天的收盘价}var1:=v>ref(v,1)*2;ref(var1,3)andcount(c>ref(c,3),3)=3;7、倍量柱加三天量减价升喇叭形的真黄金柱公式倍数:=1.9;倍量1:=REF(VOL,3)〉倍数*REF(V0L,4)ANDREF(C,3)〉=REF(O,3);价升量缩:=LLV(C,3)>=REF(L,3)ANDHHV(VOL,3)<=REF(VOL,3);连阳:=COUNT(C>=O,4)=4;选股:倍量1AND价升量缩AND连阳;8、“凹口起柱”理论编写的凹口指标王子老师的平台起柱、过顶起柱、凹口起柱理论真是了不得,十分佩服,这里我冒昧的加一个,那就是顶部起柱,经观察,股票起柱时是主力行为的表现,是主力意图的表现!是主力留下的痕迹!是量柱开口说话的语言!这个指标或许可以帮助朋友们看懂主力的行为意图,看出量柱的语言!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;TO:=C〉OANDC〉REF(C,1);选股:T7ANDT1ANDT0ORT6ANDT1ANDT0ORT5ANDT1ANDT0ORT4ANDT1ANDT0 ORT3ANDT1ANDT0;下载(53.76KB)2010-1-1221:299、倍量过左峰选股源码一通达信SRl:=REF(HIGH,10)=HHV(HIGH,2*10+l); SR2:=FILTER(SR1,1O);SR3:=BACKSET(SR2,10+l);HD:=FILTER(SR3,10);前高:=REF(H,BARSLAST(HD)); 8.60'^71:348664.00MV2:223049.20MV3:145995.53倍量:=VOL/REF(VOL,1)〉=2ANDCOUNT(CLOSE〉OPEN,1)ORLOW〉REF(HIGH,1)ANDCOUNT(OPEN〉CLOSE,1)ANDVOL/REF(VOL,1)>=2;突破前高:=CROSS(C,前高);XG:突破前高AND倍量;10、{MACD、KDJ、RSI底背离}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>CANDREF(DIFF,A1+1)<DIFFANDCROSS(DIFF,DEA);A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3)," KDJ.D"(9,3,3)),1));B2:=REF(C,A2+1)>CANDREF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3)ANDCROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));B3:=REF(C,A3+1)>CANDREF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24)ANDCROSS("RSI.RSI1"(6,12,24) ,"RSI.RSI2"(6,12,24));底背离:Bl〉0ORB2>0ORB3>0;{集成了MACD、KDJ、RSI三个指标的底背离};11、老鼠仓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;老鼠仓:BB1ANDCC1ANDDD1ANDEE1;12、主力进场VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);VAR3:=EMA(VAR2,10);VAR4:=LLV(LOW,33);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);XG:(VAR5>REF(VAR5,1)ANDVAR5>0)OR(VAR5<REF(VAR5,1)ANDNOT(VAR5=0)=1);13、60日天量T1:=V=HHV(V,100);T2:=V/REF(VOL,1)>=3;选股:T1ANDT2;14、135均量线选股VOLUME:=VOL;MAVOL1:=MA(VOLUME,5);MAVOL2:=MA(VOLUME,35);MAVOL3:=MA(VOLUME,135);选股:CROSS(MAVOL1,MAVOL2)ORCROSS(MAVOL1,MAVOL3)ORCROSS(MAVOL2,MAVOL3);15、二次翻红DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:=2*(DIF-DEA);FH1:=REF(MACD,1)<REF(MACD,2)ANDREF(MACD,2)<REF(MACD,3)ANDREF(MACD,3)<REF(MACD,4);FH2:=MACD>=0ANDCOUNT(MACD>REF(MACD,1),1)=1;FH3:=FH1ANDFH2ANDEMA(C,13)>REF(EMA(C,13),1);FH4:=FH1ANDFH2ANDABS((DIF-DEA)/C)<0.018;FH5:=FH1ANDFH2ANDMACD<0.10;二次翻红:=(FH3ORFH4ORFH5);低买:=CROSS(DIF,DEA)ANDDIF〈O;加油:=CROSS(DIF,DEA)ANDDIF>0;XG:二次翻红OR低买OR加油;16、均量互换VOLUME:=VOL;MAVOL1:=MA(VOLUME,5);MAVOL2:=MA(VOLUME,35);MAVOL3:=MA(VOLUME,135);选股:CROSS(MAVOL2,MAVOL3);17、成交额均量互换AMO:=AMOUNT;MAAMO1:=MA(AMO,5);MAAMO2:=MA(AMO,10);MAAMO3:=MA(AMO,40);XG:CROSS(TJ1,TJ2)ANDCROSS(TJ1,TJ3)ORCROSS(MAAMO1,MAAMO2)ANDCROSS(MAAMO1,MAAMO3);18、凹口起柱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>OANDC>REF(C,1);选股:T7ANDT1ANDTOORT6ANDT1ANDTOORT5ANDT1ANDTOORT4ANDT1ANDTOORT3ANDT1ANDT0;19、黄金柱选股VAR1:=V>REF(V,1)*2;REF(VAR1,3)ANDCOUNT(C>REF(C,3),3)=3;20、日成交量触及5日均量线M1:=MA(V,5);M2:V>M1;21、早盘量满个很管用的预警指标本指标描述的是上午10点前个股成交量与昨天基本相等(指标在上午10点以后就不工作了);这类股票往往是比较强势,只有在10点前成交量达到昨天水平才会预警;其中下跌的股票必须用肉眼给过滤掉。

股票选股公式编写教程(完整版)

股票选股公式编写教程(完整版)

股票选股公式编写教程第一讲:认识公式编辑器公式编辑器是导入源码和进行编写指标的窗口。

公式编辑器共分4种,分别是:1、技术指标公式编辑器;2、条件选股公式编辑器;3、交易系统公式编辑器;4、五彩K线公式编辑器。

由于这几种编辑器的展开和使用大同小异。

所以,本文仅以技术指标公式编辑器为例加以说明。

由于目前各种股软的区别,不仅有些函数不通用,编辑器的打开方式也略有区别。

本讲就是告诉大家如何展开公式编辑器。

以下共分5个图片说明打开《公式编辑器》的方法:第二讲:公式编写的基础函数打开技术指标公式,我们最常见的,它的组成不外乎两种情况,一是K线,二是均线。

其他诸如柱状线,彩带,分段线等等,都是在K线或均线基础上的延伸或变形。

为此,我们先熟悉一下构成这两种状态的基本函数。

一、K线函数非常简单,大家都可能熟知。

作为基础,还是说明一下。

1、开盘价:OPEN可简写为O2、最高价:HIGH可简写为 H3、最低价:LOW可简写为 L4、收盘价:CLOSE可简写为 C有了这4个函数,就可构成一根K线了。

比如:收盘价小于开盘价,即阴线:C<o;收阳线则互为相反。

那么长下影的光头阳线,即T形线呢?理解了原理,也很简单。

一要以最高价收盘(否则有上影),二要开盘价大于最低价。

所以有如下表示:C=H AND O>L;这里我们没有考虑下影的长度和T 字上边一横(实体部分)的宽度。

习题:一根光头阳线,实体部分小于5分钱,下影超过实体的两倍,如何表述?特别提示:编辑指标必须在英文状态下输入。

其中运用的数学符号,包括加减乘除、分号,引号等(+ - * / ; "" ''><#)也必须在英文状态下输入。

二、均线函数单根K线的形态是相当枯燥的。

尤其在主图里。

配合以均线等形式就会丰富多采,或者更利于我们从中发现规律和分析问题。

这就需要均线函数来解决了。

最常见的:1、MA(X,N),求X的N周期简单移动平均值。

通达信准确率90%以上选股公式

通达信准确率90%以上选股公式

专买老鼠仓{老鼠仓}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;老鼠仓是个很不错的指标,信号发出一般都在一个波段的底部起涨之时。

根据本人的实践,使用指标时候要注意几点:1 该指标可以添加到任何一个主图里面去,比如MA均线什么的。

2 出现信号当天买进股票,第二天收阳继续持股,直到出阴为止。

3 第二天出阴考虑卖出,非常适合短线操作!老鼠仓(选股公式)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;老鼠仓:BB1 AND CC1 AND DD1 AND EE1;理想选股(选股公式)VAR1:=MA((LOW+HIGH+CLOSE)/3,5);VAR2:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);VAR3:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) ANDREF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);VAR4:=VAR1>REF(VAR1,1) AND REF(VAR1,1)<REF(VAR1,2);VAR5:=LOW<HHV(VAR1,13) AND HIGH>HHV(VAR1,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;VAR6:=VAR5 AND COUNT(VAR4,2);VAR7:=VAR6 AND NOT(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<0,2) ANDCROSS(VAR8,MA(VAR8,2)))=1,5);VAR11:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;VAR12:=FILTER(((CROSS(VAR11,0) OR CROSS(C,VAR9)) AND VAR10)=1,3);VAR13:=MA(C,18)>=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);死叉:=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;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*RE F(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>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),CO LORYELLOW;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)*100<76;Var2:=CLOSE/MA(CLOSE,60)*100<74;Var3:=HIGH>LOW*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 ANDCLOSE/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) / 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 (VAR2 + VAR3) > 20 AND VAR4 > 40 AND BARSCOUNT(CLOSE) > 47;通达信精准选股公式:条件选股公式源码:年认同价:=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<回调认同,5)>=3;回调突破:=(REF(C,1)<=REF(回调认同,1))AND(C>回调认同)AND(回调条件)AND 多头; 成长条件:=COUNT(C<成长价值,5)>=3;成长突破:=(REF(C,1)<=REF(成长价值,1))AND(C>成长价值)AND(成长条件)AND 多头; 收益条件:=COUNT(C<收益价值,5)>=3;收益突破:=(REF(C,1)<=REF(收益价值,1))AND(C>收益价值)AND(收益条件)AND 多头; 箱底条件:=COUNT(C<箱底,5)>=3;箱底突破:=(REF(C,1)<=REF(箱底,1))AND(C>箱底)AND(箱底条件)AND 多头;价格条件:=COUNT(C<价格中枢,5)>=3;价格突破:=(REF(C,1)<=REF(价格中枢,1))AND(C>价格中枢)AND(价格条件)AND 多头; 箱顶条件:=COUNT(C<箱顶,5)>=3;箱顶突破:=(REF(C,1)<=REF(箱顶,1))AND(C>箱顶)AND(箱顶条件)AND 多头;突破买点:(回调突破+成长突破+收益突破+箱底突破+价格突破+箱顶突破);飞弹一号(选股公式)var1:=c/ma(c,40)*100<78;var2:=c/ma(c,60)*100<74;var3:=h>=l*1.051;var4:=var3 and count(var3,5)>=2;xg:var4 and (var1 or var2) and count(h=l and c=o and c<ref(c,1),3)=0and hhv(v/capital,30)<0.8;牛魔无双(选股公式)A4:=(HIGH-LOW)/HIGH*100+(C-REF(C,1))/REF(C,1)*100;B4:=EMA(MA(A4,50),5);c4:=B4>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:=(CLOSE-Var1)/Var1*100;Var4:=(CLOSE-Var2)/Var2*100;Var4<=-12 AND Var3<=-19 ;跟庄建仓(选股公式)A01:=DYNAINFO(7);A03:=BARSCOUNT(CLOSE);A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);A05:=IF((A03 > 20),A04,0);A06:=IF((LOW > A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));A07:=DMA(A06,(VOL / CAPITAL)) * 60;A09:=IF((((A07 > 0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);Var3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55)) /(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势:=EMA(Var3,3)-10;机构建仓区:=(A09 > 0 AND (趋势<20 OR 趋势>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 趋势<40,(Var11+Var12),0),3)/618;选股:火焰山>0 AND 机构建仓区>0 AND 趋势>REF(趋势,1) AND REF(趋势,1)<REF(趋势,2);跟庄建仓源码A01:=DYNAINFO(7);A03:=BARSCOUNT(CLOSE);A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);A05:=IF((A03 > 20),A04,0);A06:=IF((LOW > A01),0,IF((HIGH < A01),1,(((A01 - LOW) + 0.009) / ((HIGH - LOW) + 0.009))));A07:=DMA(A06,(VOL / CAPITAL)) * 60;A09:=IF((((A07 > 0) AND (A07 > REF(A07,1))) AND (A05 <= 88)),A07,0);Var1:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(S MA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);Var2:=EMA(Var1,8);Var3:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55)) /(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势:=EMA(Var3,3)-10;STICKLINE(趋势>80,趋势,80,5,0);DRAWICON(CROSS(趋势,0),0,1);STICKLINE((A09 > 0 AND (趋势<20 OR 趋势>REF(趋势,1)AND 趋势<50)),0,A09,6,0),colorFFff00;机构建仓区:0,LINETHICK0,colorFFFF00;Var4:=(趋势-REF(趋势,1))/REF(趋势,1)*100;STICKLINE(趋势<=13,0,20,3,0),colorcc9900;DRAWTEXT(FILTER(趋势<=13,15),30,'准备现金'),colorcc9900;STICKLINE(趋势<=13 AND Var4>13,0,50,2,0),color0099ff;Var5:=FILTER((趋势<=13 AND Var4>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,30);Var9:=EMA((CLOSE-Var7)/(Var8-Var7)*4,4)*25;STICKLINE(Var9>90,100,105,3,2),COLORRED;Var10:=(Var9-LLV(Var9,4))/(HHV(Var9,4)-LLV(Var9,4))*100;DRAWTEXT(IF(CROSS(Var9,Var10) AND Var9>87,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;Var12:=HHV(Var11,30)*8;火焰山:EMA(IF(LOW<=Var7 AND 趋势<40,(Var11+Var12),0),3)/618,COLORRED,linethick2;STICKLINE(火焰山>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(Var17<REF(Var17,1),0,Var17,1,0),color00ff00;Var18:=MA(趋势线,8);if(CROSS(Var2,Var18) AND Var2<15,50,0),COLORRED;DRAWTEXT(CROSS(趋势线,Var2)AND 趋势线>REF(趋势线,1)AND 趋势线<50,50,'追涨'),COLORff00ff;风险区:IF(趋势>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;QQ:= C<中;MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ;V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));V3:=(1+7/100)*(DMA(CLOSE,V1));V5:=MA((LOW+HIGH+CLOSE)/3,5);MA1:=MEMA(CLOSE,5);MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;MA3:=IF(MA2>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) ANDC>=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 C<REF(C,2) OR REF(C,2)=LLV(C,4) ANDREF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) ANDC<REF(C,1) AND C<REF(C,2);{收盘价=4日内收盘价的最低值AND (昨收<2日前的收盘价}VAR04:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);{昨收=4日内收盘价的最低值AND 收盘价>=2日前的收盘价}VAR05:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) ANDREF(C,2)>=REF(C,4) AND C<REF(C,1);{昨收=4日内收盘价的最高值AND 收盘价<2日前的收盘价}VAR06:=V5>REF(V5,1) AND REF(V5,1)<REF(V5,2);{今日V5向上形成拐点}VAR07:=LOW<HHV(V5,13) AND HIGH>HHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;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(VAR09<0,2) AND CROSS(VAR09,MA(VAR09,2)))=1,5);VAR12:=FILTER((HHV(VAR09,2)=HHV(VAR09,7) AND COUNT(VAR09>50,2) AND CROSS(MA(VAR09,2),VAR09))=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*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:=TTJ 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),1) AND REF(ZIG(3,5),1)>=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(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=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),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);TJ11:=EN2 AND ZTJZ5=1;TJ22:=EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2;TJ33:=EN2 AND DTJZ10=1;TJ44:=EN3 AND ZTJZ10=1;TJ55:=EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2;XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55;{以下二者结合共同选股}XG:=XG11 OR XG22;W18:EXIST(XG,1);涨停板敢死队(选股公式)Lx1:=(EMA((AMOUNT/10000000),1) /3);Lx2:=(WINNER(C)/0.3);Lx3:=IF(c<0,Lx1,V);Lx4:=IF(c<0,Lx2,V);Lx5:=IF((BARSCOUNT(C)>100),Lx3,Lx4);量:=Lx5/1000;动量:=(EMA(量,13)*1.5);A01:=IF((量>动量),量,0);A02:=BARSLAST((A01>0));A03:=REF(量,A02);趋势:=IF((量<=A01),量,A03);突破:=IF(((((量=趋势) and (C>REF(C,1))) and (量>REF(量,1))) and(REF(A02,2)>0)),888,0);量价突破:FILTER(突破,5 )*6;通达信选股公式:超级牛魔VAR3:=1;VAR4:=MA(CLOSE,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,28);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(CLOSE,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<=VAR6 ANDVAR1B>=VAR4 AND VAR1B>=VARF AND VAR16>0 AND VAR19>0 ANDVAR3=1,0.5,0);盘中参考VAR3:=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); 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:=VAR3<REF(VAR4,1) AND VOL>REF(VOL,1) AND CLOSE>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,CROSS(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;VARB:=SMA(K,3,1);J:=3*K-2*VARB,COLORGREEN;主力介入: CROSS(J,VARB) AND COUNT(VAR5<-16,4)>=1,COLORWHITE;旺狗出击旺狗出击:CROSS(C,MA(CLOSE,55) + 2*STD(CLOSE,55)) AND C>OAND VOL>1.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:=(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) ANDCROSS(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:BUY>SOLE 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 REF(SOLE,1)/REF(BUY,1)<=1.5 AND SOLE<64 AND SCCOUNT=1;狂牛启动3VAR2:=1;VAR3:=REF(HIGH,1)*1.1;VAR4:=HIGH*1.1;VAR5:=(VAR4*VOL+VAR3*(CAPITAL-VOL))/CAPITAL;VAR6:=REF(LOW,1)*0.9;VAR7:=LOW*0.9;VAR8:=(VAR7*VOL+VAR6*(CAPITAL-VOL))/CAPITAL;VAR9:=EMA(VAR8,30);VARA:=EMA(VAR5,30);VARB:=VARA-2;VARC:=IF(C<=VAR9,VARB,VARA);VARD:=MA(C,80)-MA(C,10)/17;准备:=STICKLINE(VARC-VARB=0 AND VAR2 ANDCROSS((EMA(EMA(EMA(C,2),2),2)-REF(EMA(EMA(EMA(C,2),2),2),1))/REF(EMA(EMA(EMA(C,2),2),2),1)*100,MA((EMA(EMA(EMA(C,2),2),2)-RE F(EMA(EMA(EMA(C,2),2),2),1))/REF(EMA(EMA(EMA(C,2),2),2),1)*100,3)),50,0,5,0);选股3: FILTER(VARC-VARB=0 ANDCROSS((EMA(EMA(EMA(C,2),2),2)-REF(EMA(EMA(EMA(C,2),2),2),1))/REF(EMA(EMA( EMA(C,2),2),2),1)*100,MA((EMA(EMA(EMA(C,2),2),2)-REF(EMA(EMA(EMA(C,2),2),2),1 ))/REF(EMA(EMA(EMA(C,2),2),2),1)*100,3)),4);短线通道VAR1:=(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100))*200;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=3*VAR2-2*VAR3;VAR5:=LLV(LOW,5);VAR6:=HHV(HIGH,5);VAR7:=EMA((CLOSE-VAR5)/(VAR6-VAR5)*100,4)*2;VAR8:=EMA(0.667*REF(VAR7,1)+0.333*VAR7,2);VAR9:=3*VAR7-2*VAR8;VARA:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);VARB:=POW(MA(LOW,5),2)+MA(LOW,5);VARC:=POW(MA(HIGH,5),2)+MA(HIGH,5);VARD:=(VARA-LLV(VARB,64))/(HHV(VARC,64)-LLV(VARB,64))*150+65-10;VARE:=SMA(VARD,3,1)*1.5-100;VARF:=SMA(VARE,3,1);VAR10:=3*VARE-2*VARF;VAR11:=(HIGH+LOW+CLOSE*2)/4;VAR12:=EMA(VAR11,13);VAR13:=STD(VAR11,13);VAR14:=(VAR11-VAR12)*100/VAR13;VAR15:=EMA(VAR14,5);VAR16:=EMA(VAR15,13);VAR17:=EMA(VAR15,13)+200-100;VAR18:=EMA(VAR17,10);VAR19:=3*VAR17-2*VAR18;VAR1A:=VAR2+VAR7+VARE+VAR17;VAR1B:=VAR3+VAR8+VARF+VAR18;VAR1C:=VAR4+VAR9+VAR10+VAR19;VAR1D:=(HIGH+LOW+CLOSE)/3;VAR1E:=AMOUNT/VOL/100;VAR1F:=SUM(AMOUNT,5)/SUM(VOL,5)/100;VAR20:=(VAR1D-MA(VAR1D,34))/(0.015*AVEDEV(VAR1D,34)); VAR21:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);VAR22:=(HIGH+LOW+CLOSE+VAR1D)/4;VAR23:=EMA(VAR22,24);VAR24:=STD(VAR22,24);VAR25:=(VAR22-VAR23)/VAR24*100;VAR26:=(VAR1D-MA(VAR1D,24))/(0.015*AVEDEV(VAR1D,24)); VAR27:=EMA(VAR25,5);VAR28:=(VAR1E-MA(VAR1E,21))/(0.015*AVEDEV(VAR1E,21)); VAR29:=(VAR1F-MA(VAR1F,90))/(0.015*AVEDEV(VAR1F,90)); VAR2A:=((VAR29+VAR28+VAR27+VAR26+VAR20)/5+165)/4; VAR2B:=(VAR1A+VAR1B+VAR1C*30)/32/5-15;VAR2C:=(VAR2A+VAR2B)/2/1.1;短线:=VAR2C;MID:=MA(短线,26);UPPER:=MID+2*STD(短线,26);LOWER:=MID-2*STD(短线,26);{LCJ2:=IF(短线>MID,MID,短线); }{买点: DRAWICON(CROSS(短线,MID),MID*0.97,1); } {DRAWICON(CROSS(短线,LOWER),LOWER*0.97,3); }{卖点: DRAWICON(CROSS(UPPER,短线),UPPER*0.97,2);MID, , COLORYELLOW;}{多头买入} ENTERLONG:CROSS(短线,MID) AND UPPER-MID>50;出手就赢1RSV:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1);D:=SMA(K,3,1);CROSS(K,D) AND D<30;出手就赢2RSV:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);CROSS(K,D) AND D<80;套利狐狸VAR1:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);VAR2:=REF(HIGH,10)/CLOSE>1.35;V3: (CLOSE-VAR1)/VAR1*100<-30 AND VAR2;乘胜追击1VAR1:=WINNER(CLOSE)-WINNER(OPEN);VAR2:=REF(CLOSE,1);VAR3:=SMA(MAX(CLOSE-VAR2,0),5,1)/SMA(ABS(CLOSE-VAR2),5,1)*100;VAR4:=CLOSE/MA(CLOSE,3)>=1.05;VAR5:=MA(VOL,8)/MA(VOL,45)>=2.5;VAR6:=WINNER(CLOSE)-WINNER(OPEN);VAR7:=REF(CLOSE,1);VAR8:=SMA(MAX(CLOSE-VAR7,0),5,1)/SMA(ABS(CLOSE-VAR7),5,1)*100;VAR9:=VAR6>=0.3 AND MA(VOL,6)/MA(VOL,26)>=1.9 AND VOL>REF(VOL,1) AND COUNT(VAR8<20,20)>=1 AND CLOSE/MA(CLOSE,3)>=1.07;VARA:=VAR1>=0.4 AND VAR5 AND COUNT(VAR3<20,20)>=1 AND VAR4 AND CLOSE>MA(CLOSE,85) AND VOL>REF(VOL,1);(VARA OR VAR9);逆势操作1VAR1:=DMA(CLOSE,VOL/MA(VOL,4)/4);VAR2:=DMA(CLOSE,VOL/MA(VOL,32)/32);VAR3:=(CLOSE-VAR1)/VAR1*100<-8;VAR4:=(VAR1-VAR2)/VAR2*100<-21;VAR5:=VAR3 AND VAR4 AND (OPEN>CLOSE OR OPEN<CLOSE) AND(OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.05 AND (REF(CLOSE,1)>REF(OPEN,1) OR REF(CLOSE,1)<REF(OPEN,1)) AND (REF(OPEN,2)>REF(CLOSE,2) ORREF(OPEN,2)<REF(CLOSE,2)) AND (REF(OPEN,3)>REF(CLOSE,3) ORREF(OPEN,3)<REF(CLOSE,3)) AND (REF(OPEN,4)>REF(CLOSE,4) ORREF(OPEN,4)<REF(CLOSE,4)) AND (REF(OPEN,5)>REF(CLOSE,5) ORREF(OPEN,5)<REF(CLOSE,5)) AND (REF(OPEN,6)>REF(CLOSE,6) ORREF(OPEN,6)<REF(CLOSE,6)) AND (REF(OPEN,7)>REF(CLOSE,7) ORREF(OPEN,7)<REF(CLOSE,7));VAR6:=(CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100<-23;VAR7:=(INDEXC-LLV(INDEXL,275))/(HHV(INDEXH,275)-LLV(INDEXL,275))*100;VAR8:=SMA(VAR7,50,1);VAR9:=SMA(VAR8,40,1);VARA:=VAR6 AND VAR9<23 AND COUNT(VAR6,2)=1 AND (OPEN>CLOSE OR OPEN<CLOSE) AND OPEN/REF(CLOSE,1) >0.96 ;(VAR5 OR VARA) ;牛市专利1VAR1:=REF(CLOSE,3)*0.844;VAR2:=REF(CLOSE,13)*0.767;VAR3:=INDEXC;VAR4:=INDEXV;VAR5:=MIN(VAR1,VAR2);VAR6:=100*VOL/CAPITAL;VAR7:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100;VAR8:=(CLOSE-VAR5)/CLOSE<0.07 AND SUM(VAR6,3)/3<2.345 ANDVAR3>MA(VAR3,450) AND MA(VAR4,61)/MA(VAR4,80)>0.923 ANDCLOSE>MA(CLOSE,190);VAR9:=VAR3>MA(VAR3,450) AND VAR7<-16.5 AND MA(VAR4,61)/MA(VAR4,80)>0.92 AND CLOSE>MA(CLOSE,215) AND (REF(OPEN,1)>REF(CLOSE,1) ORREF(OPEN,1)<REF(CLOSE,1)) AND (REF(OPEN,2)>REF(CLOSE,2) ORREF(OPEN,2)<REF(CLOSE,2)) AND (REF(OPEN,3)>REF(CLOSE,3) ORREF(OPEN,3)<REF(CLOSE,3)) AND (REF(OPEN,4)>REF(CLOSE,4) ORREF(OPEN,4)<REF(CLOSE,4)) AND (REF(OPEN,5)>REF(CLOSE,5) ORREF(OPEN,5)<REF(CLOSE,5)) AND VOL/CAPITAL<0.075;(VAR8 OR VAR9);同时金叉DIF:=EMA(CLOSE,9)-EMA(CLOSE,17);DEA:=EMA(DIF,8);MACD:=(DIF-DEA)*2;RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;LC:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;选股:CROSS(DIF,DEA) AND CROSS(J,D) AND CROSS(RSI1,RSI3);带量突破VAR1:=EMA(COST(80),10);COUNT(CROSS(CLOSE,VAR1),2)>=1 AND VOL/CAPITAL>=0.1;攻击箱顶VAR1:=HHV(MA((LOW+HIGH+CLOSE+OPEN)/4,5),58);BETWEEN(CLOSE,VAR1*1.001,VAR1) AND REF(VAR1,3)=VAR1 ANDVOL>REF(VOL,2);果断介入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);VAR6:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR7:=SMA(VAR6,3,1);VAR8:=SMA(VAR7,3,1);VAR9:=3*VAR7-2*VAR8;CROSS(VAR9,VAR8) AND COUNT(VAR5<-12 AND VAR5>-14,3)>=1;暴裂旋风VAR1:=ABS(HIGH-LOW);SUM(VAR1,7)/CLOSE>0.5 AND SUM(VAR1,7)/CLOSE<0.8 AND CLOSE>7 AND CLOSE<11;稳赢剑VAR1:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA( SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);VAR5:=CROSS(VAR4,10) AND VAR3<N;抄底:VAR5;领头羊白色:=SMA(HIGH,21,2)*1.05,;黄色:=SMA(LOW,21,2)*0.95;粉色:=SMA(LOW,5,1);绿色:=SMA(CLOSE,2,1),;波段买入:=IF(CROSS(绿色,粉色),白色*1.05,粉色);领头羊:=IF(CROSS(绿色,白色),白色*1.10,黄色);领头羊>黄色OR 波段买入>粉色;天星踏浪VARC:=(2*CLOSE+HIGH+LOW)/4;VARD:=LLV(LOW,34);VARE:=HHV(HIGH,34);VARF:=LLV(LOW,13);VAR10:=HHV(HIGH,13);VAR11:=EMA((VARC-VARF)/(VAR10-VARD)*100,5);VAR12:=EMA((VARC-VARD)/(VARE-VARD)*100,8);金浪:= VAR11;AA:=EMA(VAR11,7);海浪:= VAR12;IF(CROSS(金浪,AA) AND AA<=25 ,1,0);黑马绝技EMA13:=EMA(C,13);EMA30:=EMA(C,30);EMA60:=EMA(C,60);EMA90:=EMA(C,90);EMA120:=EMA(C,120);EMA250:=EMA(C,250);F1:=EMA30-EMA60<130/1000 AND EMA30-EMA90<230/1000 ANDEMA30-EMA120<330/1000;F2:=EMA60-EMA30<130/1000 AND EMA60-EMA90<230/1000 ANDEMA60-EMA120<330/1000;F3:=EMA90-EMA30<130/1000 AND EMA90-EMA60<230/1000 ANDEMA90-EMA120<330/1000;F4:=EMA120-EMA30<130/1000 AND EMA120-EMA60<230/1000 AND EMA120-EMA90<330/1000;F5:=EMA30-EMA60<100/1000 AND EMA30-EMA90<200/1000;FF1:=F1 AND F2 AND F3 AND F4 AND CROSS(EMA30,EMA60);FF2:=F1 AND F2 AND F3 AND F4 AND CROSS(EMA(C,13),EMA30);FF3:=F5 AND C>EMA250 AND CROSS(EMA30,EMA60);G1:=EMA60-EMA90<220/1000 AND EMA60-EMA120<320/1000 ANDEMA60-EMA250<420/1000;G2:=EMA90-EMA30<220/1000 AND EMA90-EMA60<320/1000 ANDEMA90-EMA250<420/1000;G3:=EMA120-EMA60<220/1000 AND EMA120-EMA90<320/1000 AND EMA120-EMA250<420/1000;G4:=EMA250-EMA60<220/1000 AND EMA250-EMA90<320/1000 AND EMA250-EMA120<420/1000;GG1:=G1 AND G2 AND G3 AND G4 AND CROSS(EMA13,EMA30);GG2:=G1 AND G2 AND G3 AND G4 AND CROSS(EMA30,EMA60);FF1 OR FF2 OR FF3 OR GG1 OR GG2;黑马起步A1:=VOL=HHV(VOL,120);A2:=CLOSE/OPEN>1.05;TJ:=A1 AND A2;TJ AND (REF(BARSLAST(TJ),1)>80 OR BARSSINCE(TJ)=0);三底背离DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA); A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) ANDCROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));底背离:B1>0 OR B2>0 OR B3>0;蓄势待发V0:=EMA(C,5);EMA10:=EMA(C,10);EMA20:=EMA(C,20);EMA30:=EMA(C,30);EMA60:=EMA(C,60);M1:=1000*EMA10/EMA60<=1015 AND 1000*EMA10/EMA60>=975;M2:=1000*EMA20/EMA60<=1020 AND 1000*EMA20/EMA60>=980;M3:=1000*EMA30/EMA60<=1015 AND 1000*EMA30/EMA60>=985;M4:=M1 AND M2 AND M3 AND CROSS(V0,EMA10);M5:=M1 AND M2 AND M3 AND CROSS(V0,EMA30);T1:=1000*EMA10/EMA30<=1010 AND 1000*EMA10/EMA30>=990;T2:=1000*EMA20/EMA30<=1010 AND 1000*EMA20/EMA30>=990;T3:=T1 AND T2 AND CROSS(V0,EMA10);T4:=T1 AND T2 AND CROSS(V0,EMA30);M4 OR M5 OR T3 OR T4;突破指标{一是突破盘整;二是突破前高;三是突破平台}W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));W4 AND COUNT(W4,5)=1;四线粘合V0:=EMA(C,5);V1:=EMA(C,10);V2:=EMA(C,15);V3:=EMA(C,30);V4:=EMA(C,60);M1:=1000*V1/V4<=1015 AND 1000*V1/V4>=975;M2:=1000*V2/V4<=1020 AND 1000*V2/V4>=980;M3:=1000*V3/V4<=1015 AND 1000*V3/V4>=985;M4:=M1 AND M2 AND M3 AND CROSS(V0,V1);M5:=M1 AND M2 AND M3 AND CROSS(V0,V3);M4 OR M5;拉升在即ABV:=MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/ 25000,2);M1:=EMA(ABV,12);M2:=EMA(ABV,26);MTM:=CLOSE-REF(CLOSE,1);MMS:=((100)*(EMA(EMA(MTM,6),6)))/(EMA(EMA(ABS(MTM),6),6));MMM:=((100)*(EMA(EMA(MTM,12),12)))/(EMA(EMA(ABS(MTM),12),12));MML:=((100)*(EMA(EMA(MTM,26),26)))/(EMA(EMA(ABS(MTM),26),26));A:=((VOL)/(CAPITAL))*(100);S:=((MA(A,30))/(MA(INDEXA,10)))*(MA(INDEXA,60));Y:=((MA(A,120))/(MA(INDEXA,10)))*(MA(INDEXA,60));X:=1;拉升在即:S<X AND Y<X AND MMS>MML AND ABV>M1 AND CROSS(S,Y);顶天立地VAR1F:=((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100);VAR21:=SMA(VAR1F,3,1);趋势:=SMA(VAR21,3,1);人气:=SMA(趋势,3,1);出击:CROSS(趋势,人气) AND (趋势<30);{短卖:IF(CROSS(人气,趋势) AND (人气>75),85,100),COLOR008000,LINETHICK2; };主力进出ABV:=MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/ 25000,2);M1:=EMA(ABV,12);M2:=EMA(ABV,26);MTM:=CLOSE-REF(CLOSE,1);。

股价在5日和10日均线之间的选股公式

股价在5日和10日均线之间的选股公式

股价在5日和10日均线之间的选股公式
选股公式可以按照以下步骤进行:
1. 计算5日均线和10日均线。

均线的计算可以使用简单移动平均法(SMA),即将过去五个交易日或十个交易日的收盘价相加,再除以五或十。

这将得到5日均线和10日均线的数值。

2. 判断股价是否在5日均线和10日均线之间。

如果股价在这两条均线之间,则满足条件。

选股公式可以写成如下形式:
股价在5日和10日均线之间 = (股价 > 5日均线) && (股价 < 10日均线)
根据这个公式,你可以筛选出满足条件的股票,即股价在5日和10日均线之间的股票。

请注意,这个选股公式只是一个示例,你可以根据自己的需求进行调整和修改。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

拆分指标,改写选股公式自己行见到论坛会员,多数求助帖子为简单的将指标中的某个信号,拆分出来单独修改为选股指标;其实,这类简单的修改,只要自己稍微熟悉一下指标的含义,然后循着发出信号的相关代码寻找上去,就可以很快的找出指标中与该信号有关的那部分源码,自己稍加修改,就可以很容易的修改为选股公式了。

大庆老杨版主已经写过一个类似帖子,对于新手,还是稍复杂了点;一品尝试再写一帖更加简单、易懂的,图文结合,让指标菜鸟看得更明白一点。

你还是指标菜鸟、而又想修改选股公式吗?那就跟着一品的引路,自己试试吧!相信你也行!(一)初识选股公式的特征①信号的唯一性:所谓选股公式,就是一个指标中仅给出唯一的一个独立的信号,不管条件是怎样的,最后输出的信号都只能有一个。

②源码的纯洁性:所有选股信号,在输出时,都禁止使用颜色(如:COLOR6600FF)、粗细(如:LINETHICK2)、文字提示、线型描述(如:POINTDOT)等修饰函数。

举例1:下面的指标【空中休整】,只有一个输出信号,而且没有任何修饰符,既可以当做副图指标,也可以当做选股指标。

{空中休整----理想论坛一品茶缘编写,通用版本副图指标}INPUT:N(2);XYX:=ABS(C/REF(C,1)-1)*100<=N OR (ABS(C/O-1)*100<=N AND ABS(C/REF(C,1)-1)*100<=6);GD:=H>=HHV(H,60)*0.9 AND COUNT(C>COST(75),3) AND (C/REF(C,1)-1)*100>=3.5;GDSJ:=BARSLAST(GD);目标:GDSJ<=8 AND COUNT(XYX,2)=2;图片参考一:举例2:下面指标【一品抄底】,是个副图指标,既有线性输出信号,也有买点提示信号,输出类别众多,就不是一个单独的选股指标。

如何修改、拆分出自己需要的【底部】选股信号,成为一个单独的选股指标呢?如果还需要将【深坑】的信号,也单独设置为选股指标,又该如何修改呢?在此先当做一个问题吧,继续看了后面(二)、(三)小节的引路,相信你自己来就行了!{一品抄底----理想论坛一品茶缘编写,通用副图指标}TYP := (HIGH + LOW + CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));A:=REF(C,1);RSI:=SMA(MAX(C-A,0),6,1)/SMA(ABS(C-A),6,1)*100;A1:=(C/MA(C,5)-1)*100<-10;A2:=(C/MA(C,13)-1)*100<-10;A3:=(C/MA(C,34)-1)*100<-15;A4:=RSI<18;A5:=CCI<-120;A6:=COUNT(ABS(C/REF(C,1)-1)*100>=6,30)>=1;底部:A1 AND A2 AND A3 AND A4 AND A5 AND A6,COLOR00FFFF,LINETHICK2; CDSJ:=BARSLAST(底部);ZF:=(C/REF(C,1)-1)*100;深坑:IF(BETWEEN(CDSJ,0,5) AND L<=REF(C,CDSJ) AND ZF<=-5,-0.5,0),COLORFF0000,LINETHICK2;机会:IF(CDSJ<=7 AND L<=REF(C,CDSJ),0.5,0),COLOR00FF00;图片参考二:(二)寻找选股信号的来源所谓选股信号,多数都是属于将已有的指标公式中具有买点类的信号特征“剥离”出来。

那么,在指标中该保留哪些有用的源码,删除哪些无关的源码呢?寻找选股信号的来源,就是最主要的过程。

寻找选股信号来源的方法,一般都是遵循从后往前寻找的原则。

具体步骤是:先找到发出指标信号的那行代码,然后查看该行代码中的所有条件,需要用到上面哪些源码,再从后往前一一对应寻找出来;而其他无关的条件、修饰符号源码,均可删除。

举例3:(本例子参考大庆老杨先生帖子,略有改动){股市马经----副图指标,源码来自网络}A1:3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L, 55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑马线:EMA(A1,5),LINETHICK2,COLOR6600FF;A2:=(黑马线-REF(黑马线,1))/REF(黑马线,1)*100;A3:=EMA(C,5);A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2)),LINETHICK2,coloryello w;A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*100;DRAWTEXT(FILTER(REF(黑马线,1)>90 AND A2<0,7),黑马线,'跑'),COLOR00FF00; DRAWTEXT(CROSS(A1,黑马线)AND 黑马线<A5,黑马线,'黑马');DRAWTEXT(CROSS(黑马线,A5)AND 趋势线<80,黑马线,'追涨');DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,5,'大黑马');底部:(A2<-10 AND A2>REF(A2,1))*25,colorred;DRAWICON(底部 AND A3>REF(A3,1),25,4);机会来临:REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,30,0),1),COLORF00FF0;大势已去:IF(CROSS(黑马线,A1)AND 黑马线>70 AND 趋势线>80,90,100),COLORFF0000;图片参考三:分析一下,这个公式中涉及“买”的信号有黑马、追涨、大黑马、底部和机会来临五个明显的,另外还有一个画图标信号。

假如我们提取其中的【机会来临】,仔细分析后,就是一句话:机会来临:REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,30,0),1);这个可看作简单提取。

如果提取【大黑马】的话,从后向前推,涉及趋势线和黑马线两个定义,这部分都有用:A1:3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L, 55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑马线:EMA(A1,5),LINETHICK2,COLOR6600FF;A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2)),LINETHICK2,coloryello w;DRAWTEXT(CROSS(趋势线,0) AND 黑马线<40,5,'大黑马');(三)修改选股指标的方法根据以上选股公式的特征,结合寻找选股信号来源的方法,自己动手修改选股信号,应该就没有太大的难度了!举例4:继续承接上面(二)的例子。

修改步骤:①先将线性输出的A1、黑马线、A4、趋势线均限制输出,方法很简单,就是在他们的冒号后面直接加上等号=;②再删去修饰符LINETHICK2,COLOR6600FF:③将本来是文字输出的“黑马线”修改成信号输出;先将“黑马线”三个字移动到最前面,并加上冒号:;然后保留符合黑马线的限制条件CROSS(趋势线,0) AND 黑马线<40;同时删除其余无关的代码,包括文字输出函数DRAWTEXT、位置、括号()等。

修改成选股指标后的源码如下:A1:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L ,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑马线:=EMA(A1,5);A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:=(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2));大黑马:CROSS(趋势线,0) AND 黑马线<40;举例5:下面附图指标【大三浪】中,如何选出出现“买”字提示信号的选股指标?{大三浪----理想论坛一品茶缘编写,通用副图指标}{大三浪指标使用说明:均线粘合且多头,长期未涨庄吸筹;目标锁定先跟踪,出击买入等丰收!}{N:30,120,65;}MA5:=MA(CLOSE,5);MA21:=MA(CLOSE,21);MA65:=MA(CLOSE,N);多头:=COUNT(MA21>MA65,10)=10;GX:=MAX(MA5,MAX(MA21,MA65));DX:=MIN(MA5,MIN(MA21,MA65));粘合:=ABS(GX/DX-1)*100<=15;多头粘合:IF(多头 AND 粘合,1,0),COLORFF00FF,POINTDOT,LINETHICK0; DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);庄股:COUNT(MACD<0,10)=10,COLORFFFF00,POINTDOT,LINETHICK0;目标:IF(多头 AND 粘合 AND 庄股,5,0),COLORFFFFFF,LINETHICK2;跟踪:IF(目标,BARSLAST(CROSS(目标,0))+1,0),COLOR00FF00,POINTDOT,LINETHICK2;出击:IF(CROSS(0.1,目标) AND CROSS(MACD,0),8,0),COLOR00FFFF,LINETHICK2; MJSJ:=BARSLAST(出击>0);涨幅:IF(MJSJ<=120,(C/REF(C,MJSJ)-1)*100,0),COLOR0000FF,POINTDOT,LINETHI CK0;日涨:IF(MJSJ<=120,涨幅/MJSJ,0),COLORFFFFFF,POINTDOT,LINETHICK0; TPX:=MIN(MA65*1.15,MA21*1.13);突破:IF(CROSS(C,TPX) AND 粘合AND MA65>REF(MA65,1),10,0),COLOR0000FF,LINETHICK2;{以下设置副图显示方式}STICKLINE(多头粘合,0,1,8,0),COLORFF00FF;STICKLINE(庄股,0,MACD*10,8,0),COLORFFFF00;DRAWTEXT(出击=8,10,'★买'),COLOR00FFFF;VERTLINE(CROSS(涨幅,20) AND COUNT(CROSS(涨幅,20),MJSJ)=1,2),COLOR0000FF;图片参考四:根据选股指标的步骤,一步一步来:①首先找到出现“★买”提示的一行代码,发现她其实就是“出击”的信号;②从后往前,找到“出击”信号的条件,发现他与“目标”、MACD有关;再次往前寻找,又发现“目标”信号的条件,与“多头”、“粘合”、“庄股”三个条件有关,由此,保留相关条件代码,其余删除,如下:{N:30,120,65;}MA5:=MA(CLOSE,5);MA21:=MA(CLOSE,21);MA65:=MA(CLOSE,N);多头:=COUNT(MA21>MA65,10)=10;GX:=MAX(MA5,MAX(MA21,MA65));DX:=MIN(MA5,MIN(MA21,MA65));粘合:=ABS(GX/DX-1)*100<=15;DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);庄股:COUNT(MACD<0,10)=10,COLORFFFF00,POINTDOT,LINETHICK0;目标:IF(多头 AND 粘合 AND 庄股,5,0),COLORFFFFFF,LINETHICK2;出击:IF(CROSS(0.1,目标) AND CROSS(MACD,0),8,0),COLOR00FFFF,LINETHICK2;③限制输出数量,只保留“出击”信号的输出,其他的输出信号均加上等号=加以限制输出;④删除多余的修饰符号,如:COLORFFFF00,POINTDOT,LINETHICK0等。

相关文档
最新文档