今日热文:股票选股公式汇总 测试选股公式有哪些?

发布时间:   来源:CSDN  

股市多风险,不要靠指标来操作!


(资料图)

那指标干什么,欣赏,参考!看看别人的思维。

0: 测试选股公式效果

将要测试的选股条件建成条件选股公式, 在菜单->功能->公式系统->程序交易评测系统中; 在条件选股框中选中所建条件选股公式;点击添加品种,在分类中选中深沪A股,点击全选,确定; 设置测试时段,点击开始测试

1. boll 中轨连续上行至少5天,股价下行三天已经接近中轨

这个指标不好用,因为它这么缓缓下跌,你不敢进,中规托不住的情况居多吧?

BOLL:=MA(CLOSE,10); {UB:BOLL+2*STD(CLOSE,N);} {LB:BOLL-2*STD(CLOSE,N);}

XG:COUNT(BOLL>REF(BOLL,1),5)>=5 AND COUNT(C

2.macd 0轴上方金叉选股或者 2波绿柱缩短且macd 背离选股(即二次股价低,二次macd 高) DIFF:=EMA(C,12)-EMA(C,26); DEA:=EMA(DIFF,9); MACD:=2*(DIFF-DEA); {天数:=BARSLAST(REF(CROSS(MACD,REF(MACD,1)) AND MACD<0,1));} {XG:CROSS(MACD,REF(MACD,1)) AND REF(C,1)REF(MACD,天数+2) AND MACD<0;} XG: CROSS(DIFF,DEA) && DEA > 0;

3. 副图指标: 山坛线

这个指标,上升时总是发出卖的信号,下跌时总是发出买的信号,最为反面教材放到这。 不过,它的采样55天取点还可以借鉴,否则早扔了。 VAR1:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100; VAR2:=SMA(VAR1,13,1); VAR3:=SMA(VAR2,13,1); 出击:3*VAR2-2*VAR3,COLORYELLOW,LINETHICK2; 山坛线:MA(出击,5),COLORRED,LINETHICK2; 阻力:3*VAR3-2*VAR2,COLORBLUE,LINETHICK2; DRAWTEXT(VAR1<阻力 AND CROSS(出击,山坛线),山坛线,"I买I")COLORYELLOW; DRAWTEXT(VAR1>阻力 AND CROSS(山坛线,出击),山坛线,"I卖I")COLORCYAN;

4: 承压线绘制:

使用了BACKSET, FILTER 函数,慎用,仅仅是图画的漂亮 NF:(C+REF(C,1)+REF(C,2)+H+REF(H,1)+REF(H,2)+L+REF(L,1)+REF(L,2)+O+     REF(O,1)+REF(O,2))/12,LINETHICK2,COLORLICYAN;  {徐文明保护价}  MA5:=MA(CLOSE,5);  MA10:=MA(CLOSE,10);  保护价 :(REF(CLOSE,2)+REF(CLOSE,1)+O)/3;  N:=75;P:=5;P1:=10;  {N为多少天内的高低值参数,我以自已的初始K线根数定义。  P、P1为短、长支撑压力取点参数}  A1:=REF(H,P)=HHV(H,2*P+1);  {5天前的最高价也是11天的最高价}  B1:=FILTER(A1,P);        {过滤信号,使成为一个尖峰}  C1:=BACKSET(B1,P+1);        {向前赋值,使有效}  D1:=FILTER(C1,P);        {过滤,使第一个有效}  E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); {向前赋值,直到莫一天} F1:=E1>REF(E1,1);            {实际也有过滤之意}  短压:DRAWLINE(D1,H,F1,H,1),COLORCYAN;  A2:=REF(L,P)=LLV(L,2*P+1);  B2:=FILTER(A2,P);  C2:=BACKSET(B2,P+1);  D2:=FILTER(C2,P);  E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);  F2:=E2>REF(E2,1);  短支:DRAWLINE(D2,L,F2,L,1),COLORLIRED;  AA1:=REF(H,P1)=HHV(H,2*P1+1);  BB1:=FILTER(AA1,P1);  CC1:=BACKSET(BB1,P1+1);  DD1:=FILTER(CC1,P1);{GUPIAOFF.COM};  EE1:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1); FF1:=EE1>REF(EE1,1);  长压:DRAWLINE(DD1,H,FF1,H,1),COLORGREEN;  AA2:=REF(L,P1)=LLV(L,2*P1+1);  BB2:=FILTER(AA2,P1);  CC2:=BACKSET(BB2,P1+1);  DD2:=FILTER(CC2,P1);{GUPIAOFF.COM};  EE2:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);  FF2:=EE2>REF(EE2,1);  长支:DRAWLINE(DD2,L,FF2,L,1),COLORRED;

5. cci-cci15指标 cci 演示了一种对股价的拉升能力,cci是个短期指标,且适用于非常时期。 下面的公式只是好玩,背离了也不一定反转,但可以参考一下,又有cci,cci15互相参照, 对股价位置也容易定位。 N:=14; M:=210; TYP:=(HIGH+LOW+CLOSE)/3; CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)); TYP15:=(HHV(HIGH,15)+LLV(LOW,15)+CLOSE)/3; CCI15:(TYP15-MA(TYP15,M))/(0.015*AVEDEV(TYP15,M)),COLORRED; AA:=REF(CCI,3)=HHV(CCI,2*3+1); BB:=BACKSET(AA,3+1); CC:=FILTER(BB,3) AND CCI=HHV(CCI,3+1); A1:=BARSLAST(REF(CC,1)); 顶背离:=REF(CLOSE,A1+1)CCI AND CC; DRAWLINE(CC,CCI,FILTER(顶背离>0,5),CCI,0),COLORRED,LINETHICK3; AA2:=REF(CCI,3)=LLV(CCI,2*3+1); BB2:=BACKSET(AA2,3+1); CC2:=FILTER(BB2,3) AND CCI=LLV(CCI,3+1); AA2A:=BARSLAST(REF(CC2,1)); 底背离:=REF(C,AA2A+1)>CLOSE AND REF(CCI,AA2A+1)0,5),CCI,0),COLORRED,LINETHICK4; M100:100, COLOR808080; M_100:-100, COLOR808080; M0:0, COLOR808080;

6:大阳线主图指标DY

是我喜欢的一个指标,也是由我整理,它提示了很多信息 C1:=REF(C,1); 涨停:=C>REF(C,1)*1.09; STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED; STICKLINE(涨停,H,L,0,0),COLORRED; 跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=9.9,1,0); STICKLINE(跌停,OPEN,CLOSE,3,0),COLORGREEN; STICKLINE(跌停,H,L,0,1),COLORGREEN; 半涨:=(C-C1)*100/C1>=4.0 &&(C-C1)*100/C1 < 9.9; 大阳:=半涨;{ AND FINANCE(33)>0;} STICKLINE(大阳,OPEN,CLOSE,3,0),COLORYELLOW; STICKLINE(大阳,H,L,0,0),COLORYELLOW; 半跌1:=(C1-C)*100/C1>4.0 && (C1-C)*100/C1<9.9; 大阴:=半跌; STICKLINE(大阴,OPEN,CLOSE,3,0),COLORBLUE; STICKLINE(大阴,H,L,0,0),COLORBLUE; {NUMBER:=COUNT(非ST涨停,BARSSINCE(非ST涨停)+1);} NUMBER:=COUNT(涨停,250); DRAWNUMBER(涨停,HIGH*1.04,NUMBER),COLORWHITE; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.56,0.02,0,NUMBER),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.45,0.02,0,"250交易日共涨停"),COLORYELLOW; {250天内涨停数量} 涨停数:=COUNT(涨停,250); DRAWTEXT_FIX(ISLASTBAR && 涨停数>=10,0.9,0,0,"强庄"),COLORRED; DRAWNUMBER_FIX(1=1,0.98,0,1,CONST(涨停数)),COLORRED; {停牌天数>10} 停牌天数:=DATETODAY(DATE) - DATETODAY(REF(DATE,1)); DRAWTEXT(停牌天数>10,L*0.98,"停"),COLORRED; DRAWNUMBER(停牌天数>10,L*0.97,停牌天数),COLORRED; 流通股:=FINANCE(7)/10000; 总股本:=FINANCE(1)/10000; 解禁股:=IF(总股本=REF(总股本,1) && 流通股>REF(流通股,1),20,0); 转送股:=IF(总股本>REF(总股本,1),20,0); 冻结股:=IF(流通股

7:均量线副图指标,关注量能的人可以参考

TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1))))); MTIME:=MOD(FROMOPEN,TOTAL); CTIME:=IF(MTIME<0.5,TOTAL,MTIME); VVOL:IF((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VOL*TOTAL/CTIME,DRAWNULL),NODRAW; STICKLINE((CURRBARSCOUNT=1 AND DYNAINFO(8)>1),VVOL,0,-1,-1),COLOR00C0C0; V1:IF((CURRBARSCOUNT=1),DRAWNULL,VOL),COLORWHITE; V5:MA(VOL,5),COLORYELLOW; V35:MA(VOL,35),COLORMAGENTA; V135:MA(VOL,135),COLORGREEN;

8:换手率副图指标,很漂亮,以颜色柱反映了交易的活跃程度。

换手:VOL/CAPITAL*100, POINTDOT COLORMAGENTA; HS:=V/CAPITAL*100; STICKLINE(HS<5,0,HS,2,0),COLORGREEN; STICKLINE(HS>=5 AND HS <10,0,HS,2,0),COLORYELLOW; STICKLINE(HS>=10,0 AND HS < 15,HS,2,0),COLORFF00FF; STICKLINE(HS>=15.0,0,HS,2,0),COLORRED; TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1))))); 换手参与线:(5/240)*TOTAL, COLORYELLOW;

9: 百日地量线选股公式 N:=3; {时间设定} M4:=60; VL:=VOL; VL60:=MA(VOL,M4); V1:=MIN(REF(VOL,1),REF(VOL,2)); V2:=MIN(REF(VOL,3),REF(VOL,4)); V3:=MIN(REF(VOL,5),REF(VOL,6)); V4:=MIN(REF(VOL,7),REF(VOL,8)); V5:=MIN(REF(VOL,9),REF(VOL,10)); V6:=MIN(REF(VOL,11),REF(VOL,12)); V7:=MIN(REF(VOL,13),REF(VOL,14)); V8:=MIN(REF(VOL,15),REF(VOL,16)); W1:=MIN(MIN(V1,V2),MIN(V3,V4)); W2:=MIN(MIN(V5,V6),MIN(V7,V8)); ZM1:=MIN(W1,W2); {芝麻量} ZT:=CLOSE>REF(CLOSE,1)*1.093 AND LVL60;    {今日量过VL60} 去停牌:=DYNAINFO(17)>0; XG:ZT AND czzml AND lg60 AND 去停牌 ;

相关文章Related

返回栏目>>