注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

天相子的博客

医、易、武、释、儒、道、诸子百家、哲学、宗教、学术、证券投资

 
 
 

日志

 
 
关于我

爱好:医、易、武、释、儒、道、诸子百家、哲学、宗教、学术、证券投资

网易考拉推荐

选股公式源码大全(一)  

2009-02-02 15:07:00|  分类: 我在股市 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

      一、以下公式仅供学习研究之用;

     二、选股公式只能起到一个条件过滤的作用,具体操作还得综合其他技术面、基本面等;

     三、不同的行情要用不同的方式,不可能一劳永逸;

一、{选股公式}
ZLC:= EMA((WINNER(CLOSE) * 70),3);
SHC:= EMA(((WINNER((CLOSE * 1.1)) - WINNER((CLOSE * 0.9))) * 80),3);
主力控盘:= ((ZLC / (ZLC+ SHC)) * 100);
上限:= HHV(主力控盘,20);
下限:= LLV(主力控盘,20);
中线:=(上限 + 下限)/2;
A:=60;
B:=10;
抄低:CROSS(主力控盘,B);

二){选股公式}
LC := REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),10,1)/SMA(ABS(CLOSE-LC),10,1)*100;
跌破:CROSS(20,RSI);

三){简单实用选股公式}
公式名:波段
M3:MA((CLOSE*2+H+L)/4,3);
M3_3:MA(M3,3),COLORGREEN;
选股公式:
M3:=MA((CLOSE*2+H+L)/4,3);
M3_3:=MA(M3,3);
xg:cross(M3,M3_3);

四){选股公式}
VAR1P:=(CLOSE-LLV(LOW,60.135))/(HHV(HIGH,60.135)-LLV(LOW,60))*80;
VAR2P:=SMA(VAR1P,7,1);
VAR3P:=SMA(VAR2P,5,1);
IF(CROSS(VAR2P,VAR3P) AND VAR2P<20,85,0);

五){选股公式}
N:=9;
RSV:= (CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,2,1);
D:=SMA(K,2,1);
K>D AND REF(K,1)<REF(D,1);

六){选股公式}
LOWV:=LLV(LOW,27);
HIGHV:=HHV(HIGH,27);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:=EMA(RSV,3);
D:=MA(K,9);
bb:= CLOSE>OPEN and CLOSE<REF(OPEN,1);
cc:=(c-ref(c,20))/ref(c,20)<-0.18;
cq:=SPLITBARS(0 )<15;
xg: k<20 AND d<20 and bb AND ref(CC,1)=1 and cq=0 ,colorred;

七){狙击低点选股公式
      股价在上升途中的回调时,突然走出跌破20日均线的大(中)阴线;第二天走出一根下探的长下影线的K线(阴阳均可)。此K线组合市场意义在于股价探底回升,之后一般会走出一段不错的上升行情}
ref(c,1)<ref(o,1) and ref(c,2)*0.95>=ref(c,1) and ref(o,1)/ref(c,1)>=1.04
and (MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667 and ma(c,10)>ma(c,20)
and ref(c,1)>ma(c,20) and l<ma(c,20) and c>ma(c,20) ;

八){分时横盘选股公式}
tt:=BARSCOUNT(CLOSE);
CC:=CLOSE;
均线:=SUM(AMOUNT,0)/SUM(VOL*100,0);
上均:=均线 + AVEDEV(C,tt)*2;
下均:=均线 - AVEDEV(C,tt)*2;
时长:=if(HOUR>=13 AND HOUR<15 ,1,0);
涨幅:=(CLOSE>DYNAINFO(3))>1.02;
跌幅:=(CLOSE/DYNAINFO(3))<0.98;
横盘:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE)<0.03;
yy:=SMA(VOL,30,1);
放量:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30))>0.92;
涨跌幅:=涨幅 OR 跌幅;
横涨:=涨跌幅=0 and 横盘 and 时长 and 放量 and CROSS(CC,上均);
突破:FILTER(横涨,100);

九){选股公式}
var1:=cross(ma(c,5),ma(c,10));
var2:=c>ma(c,60);
DIFF:= EMA(CLOSE,26) - EMA(CLOSE,12);
DEA:= EMA(DIFF,9);
MACD:= 2*(DIFF-DEA);
var3:=cross(diff,macd);
var4:=(v/FINANCE(7))>5;
var5:=ma(v,5)>ma(v,34);
xg:var1 and var2 and var4 and var5;

十){周线买入选股公式}
AA05:=MA(C,5);
五日乖离率:=(c-AA05)/AA05*100;
AA30:=MA(C,30);
三拾日乖离率:=(c-AA30)/AA30*100;
MR:=count(cross(五日乖离率,0),3)>=1 and 三拾日乖离率>ref(三拾日乖离率,1) and AA05>ref(AA05,1) and (c/ref(c,1)-1)*100>5 and ref(c,1)<AA30;
买入:IF(filter(MR,10),1,0);

十一){抄底逃顶选股公式}
VAR1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR2:=SMA(VAR1,3,1);
VAR3:=SMA(VAR2,3,1);
VAR4:=SMA(VAR3,3,1);
VAR6:=CROSS(VAR3,VAR4) AND VAR3<25;
选股:VAR6 AND COUNT(VAR6,10)=1;

十二){选股公式}
多头线:(SUM((((2)*(CLOSE-CLOSE*0.2)+(OPEN-OPEN*0.2)+(HIGH-HIGH*0.2)+(LOW-LOW*0.2))/(5))*(VOL),8))/(SUM(VOL,8)),COLOR0099FF,LINETHICK1;
空头线:LLV(多头线,8),LINETHICK1,COLORGREEN;
C-C*0.2,COLORWHITE,LINETHICK1;
用法:3条线作多,白线上穿绿线或黄线涨幅一般大于7%

十三){选股公式}
input:N(20,1,100),M(60,1,100);
RSV:=(((CLOSE - LLV(LOW,N)) / (HHV(HIGH,N) - LLV(LOW,N))) * 100);
RSV1:=((100 * (HHV(HIGH,M) - CLOSE)) / (HHV(HIGH,M) - LLV(LOW,M)));
MA1:=MA(CLOSE,11);
MA2:=MA(CLOSE,22);
MA3:=MA(CLOSE,44);
VAR1:=IF((CLOSE > REF(CLOSE,1)),88,0);
VAR2:=IF(((((CLOSE / REF(CLOSE,1)) > 1.052) AND ((HIGH / CLOSE) <= 1)) AND (VAR1 > 0)),91,0);
VARA:=FILTER((VAR2 > 90),34);
VAR3:=(((OPEN < MA1) OR (OPEN < MA2)) OR (OPEN < MA3));
VAR4:=(CLOSE > MAX(MA1,MAX(MA2,MA3)));
VAR5:=((VOL / MA(VOL,30)) > 1.2);
VAR6:=((CLOSE / REF(CLOSE,1)) > 1.052);
VARB:=(((VAR3 AND VAR4) AND VAR5) AND VAR6);
VARC:=DMA(MA((CLOSE + ((REF(CLOSE,5) / CLOSE) * 0.098)),90),VOL);
K1:=SMA(RSV1,3,1);
D1:=SMA(K1,3,1);
AA:=EMA(D1,20);
K:=SMA(RSV,3,1);
D:SMA(K,3,1),LINETHICK1;
J:((3 * K) - (2 * D)),LINETHICK1;
RSV2:=EMA(J,10);
VARD:=(RSV2 > AA);
十天百分之五:STICKLINE((((VARB AND VARD) AND (VARC > REF(VARC,2))) OR (((VARA AND VARD) AND (VARC > REF(VARC,2))) > 0)),0,50,4,0),colorFF0000;
东方之珠:IF((((VARB AND VARD) AND (VARC > REF(VARC,2))) OR ((VARA AND VARD) AND (VARC > REF(VARC,2)))),95,0),colorFF0000;

十四){选股公式}
R:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));{零延迟威廉线}
PERIODD:=10;
EMA1:=EMA(R,PERIODD);
EMA2:=EMA(EMA1,5);
DIFFERENCE:=EMA1-EMA2;
ZEROLAGEMA:=EMA1+DIFFERENCE;
PR:100-ABS(ZEROLAGEMA), COLORRED ,LINETHICK1;
MOVEAVG:MA(PR,5), COLORWHITE ,LINETHICK1;

K:=15;
FFILTER:=(K/100)*STD(PR-REF(PR,1),10);
XA:=IF(PR<REF(PR,1),PR,0);
XN:=BARSLAST(XA>0 );
AMALOW:=REF(PR,XN);
YA:=IF(PR>REF(PR,1),PR,0);
YN:=BARSLAST(YA>0) ;
AMAHIGH :=REF(PR,YN);
RR:=IF( AMAHIGH-PR>FFILTER,-1,0) ;
TT:=IF( PR- AMALOW>FFILTER,1,RR) ;

十五){绝杀选股公式}
VAR1:=(2)*(MA((LLV((CLOSE + LOW)/(2),8))*(1.1),13)) - EMA((CLOSE + LOW)/(2),3) -
((CLOSE + LOW)/(2))*(0.1);
VAR2:=IF(((EMA((CLOSE + LOW)/(2),3) - VAR1)*(5) > 0),(POW((EMA((CLOSE +
LOW)/(2),3) - VAR1)*(5),2))/(10),(((-1))*(POW((EMA((CLOSE + LOW)/(2),3) -
VAR1)*(5),2)))/(10));
VAR3:=IF((VAR2 > 0),VAR2 - 0,(-1));
CROSS(VAR3,0) AND ((CLOSE + LOW)/(2) > MA((CLOSE +
LOW)/(2),8));

十六){老鼠仓选股公式}
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;

十七){选股公式}
TJ1:=(SUM((((2)*(CLOSE-CLOSE*0.2)+(OPEN-OPEN*0.2)+(HIGH-HIGH*0.2)+(LOW- LOW*0.2))/(5))*(VOL),8))/(SUM(VOL,8));
TJ2:=C-C*0.2;
XG:CROSS(TJ2,TJ1);

十八){选股公式}
{两行kdj}
j:"kdj.j"(27,3,3);
if(j>0,j,0);
{用法:谷底买,峰顶卖};

十九){超级短线选股公式}
AA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AA,0),5,1)/SMA(ABS(CLOSE-AA),5,1)*1000;
HHH:=BBB-LLV(BBB,10);
SS:=(MA(HHH,2)*3+HHH*13)/16;
短线买点:IF(SS>13,MA(SS,2),SS);
21;
当白色趋势线接近或者下穿黄色底部线时,表示短线可能见底,
有出现反弹的可能,可以配合其它指标配合短线关注。

二十){拉升资金选股公式}
VAR1:=1;
VAR1:=1;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3*VAR1;
VAR5:=REF(LLV(CLOSE,480),1)*VAR1;
VAR6:=REF(HHV(CLOSE,480),1)*VAR1;
VAR7:=100*(CLOSE-VAR5)/(VAR6-VAR5)*VAR1;
VAR8:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100*VAR1;
VAR9:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100*VAR1;
VARA:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100*VAR1;
VARB:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100*VAR1;
VARC:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4*VAR1;
VARD:=IF(VARC>23.16,VARC,0)*VAR1;
VARE:=VARC<1*VAR1;
VARF:=VARD*VAR1;
VAR10:=VAR4<0 AND VAR7<0;
VAR11:=1;
VAR12:=(HIGH+LOW+CLOSE*2)/4*VAR11;
VAR13:=EMA(VAR12,21);
VAR14:=STD(VAR12,21);
VAR15:=((VAR12-VAR13)/VAR14*100+200)/4*VAR11;
VAR16:=(EMA(VAR15,89)-25)*1.56*VAR11;
VAR17:=EMA(VAR16,5)*1.22*VAR11;
VAR18:=EMA(VAR17,3)*VAR11;
VAR19:=3*VAR17-2*VAR18*VAR11;
VAR1A:=IF(CROSS(VAR19,VAR17) AND CROSS(VAR19,VAR18) AND CROSS(VAR17,VAR18),1,0);
VAR1B:=IF(CROSS(VAR17,VAR19) AND CROSS(VAR18,VAR19) AND CROSS(VAR18,VAR17),1,0);
买点: IF(FILTER(VAR8=0 AND VARE AND VAR10 AND VAR1A,5)=1,10,0);
卖点: IF(FILTER(VAR8=100 AND VARF AND VAR1B,5)=1,10,0);
VAR1C:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/4*VAR1;
VAR1D:=EMA(CLOSE,2)-EMA(CLOSE,89)*VAR1;
VAR1E:=EMA(VAR1D,30)*VAR1;
VAR1F:=2*(VAR1D-VAR1E)*10*VAR1;
VAR20:=POW(VAR1F,3)*0.1+POW(VAR1F,2)*VAR1;
VAR21:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR22:=EMA(VAR21*0.97,3)*VAR1;
VAR23:=(HIGH+LOW+CLOSE)/3*VAR1;
VAR24:=(VAR23-MA(VAR23,14))/(0.015*AVEDEV(VAR23,14))*VAR1;
VAR25:=IF(YEAR<2009 AND VAR1F>0.015,VAR20,0)/45*VAR1;
拉升资金: VAR25,COLORRED;
VAR26:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR27:=EMA(VAR26,100);
VAR28:=2*(VAR26-VAR27);
VAR29:=POW(VAR28,3)*0.1+POW(VAR28,1);
VAR2A:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR2B:=EMA(VAR2A*0.97,3);
VAR2C:=(HIGH+LOW+CLOSE)/3;
VAR2D:=(VAR2C-MA(VAR2C,14))/(0.015*AVEDEV(VAR2C,14));
主力资金: IF(YEAR<2009 AND VAR28>0.1,VAR29,0)*5;


廿一){选股公式}
{筹码集中}
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
单峰密集:A3/A4*100<15,linethick0;
B1:=HHV(HIGH,250);
B2:=LLV(LOW,250);
B3:=B1-B2;
低位:A4<(B3*0.4+B2),linethick0;
低位单峰密集:单峰密集 AND 低位,colorred;
高位:A4>(B3*0.7+B2),linethick0;
高位单峰密集:单峰密集 AND 高位,colorgreen;
(042){三位一体选股公式}
STICKLINE(OPEN>=CLOSE,VOL,0,9,0),colorAAAAAA;
STICKLINE(OPEN>=CLOSE,VOL,0,6,0),colorBBBBBB;
STICKLINE(OPEN>=CLOSE,VOL,0,2.4,0),colorCCCCCC;
STICKLINE(OPEN>=CLOSE,VOL,0,1.1,0),colorDDDDDD;
STICKLINE(CLOSE>OPEN,VOL,0,9,0),color6666CC;
STICKLINE(CLOSE>OPEN,VOL,0,6,0),color7777DD;
STICKLINE(CLOSE>OPEN,VOL,0,2.4,0),color8888EE;
STICKLINE(CLOSE>OPEN,VOL,0,1.1,0),color9999FF;
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0),color1199FF;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5,0),color1199FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5,0),colorCCCCCC;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5,0),colorCCCCCC;
VAR1:=DYNAINFO(17)*REF(MA(VOL,5),1);
VAR2:STICKLINE(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,0,4,1);
VARC:=(SMA(ABS(LOW-REF(LOW,1)),3,1))/(SMA(MAX(LOW-REF(LOW,1),0),3,1));
RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV1,3,1);
D1:=SMA(K1,3,1);
J1:=3*K1-2*D1;
RSV:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;
K:=SMA(RSV,6,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
LC:=REF(CLOSE,1);
XA:=(IF(CROSS(J1,J) AND J<20,-1,0))+(IF(CROSS(J,J1) AND J>80,1,0));
TYP:=(HIGH+LOW+CLOSE)/3;
CCJ:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))/2;
RSI1:=(SMA(MAX(CLOSE-LC,0),6,1))/(SMA(ABS(CLOSE-LC),6,1))*100;
VAR222:=LLV(LOW,36);
VAR333:=HHV(HIGH,36);
K2:=EMA((CLOSE-VAR222)/(VAR333-VAR222)*100,9);
XB:=(IF(CCJ>100 AND K2>50 AND CLOSE>OPEN,0.5,0))+(IF(RSI1>80 AND K2>50 AND CLOSE>OPEN,0.5,0));
RSV3:=(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100))*100;
K13:=SMA(RSV3,21,1);
D13:=SMA(K1,3,1);
J13:=3*K13-2*D13;
XC:=IF(J13>80 AND RSI1>85,0.5,0);
金指:(EMA(IF(LOW<=LLV(LOW,30),VARC,0),3))*150,LINETHICK2,colorFF0000;
IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR2),colorFF0000;
警戒线:(IF(XA+XB+XC>0,61.8,0))*150;
DRAWTEXT(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VOL,'动态行情VOL');

廿二){机构建仓选股公式}
VAR2:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
VAR3:=SMA(VAR2,4,1);
VAR4:=SMA(VAR3,2,1);
VAR5:=VOL/CAPITAL*100;
VAR6:=REF(VAR5,1);
机构建仓:VAR4<14.5 AND VAR3<11;
大户减仓:VAR6>30 AND VAR6<47;
机构减仓:VAR4>82 AND VAR3>89;
股价临界:VAR4>85 AND VAR3>95;

廿三){选股公式}
M:=13; P:=25; S:=15;
A:=100*V/CAPITAL;
EE:=SUMBARS(A,2);
FF:=SUMBARS(A,98);
V1:=HHV(C,EE)/HHV(HHV(C,EE),M)*100;
V2:=HHV(C,FF)/HHV(HHV(C,FF),M)*100;
K1:=SMA(V1,2,1);
K2:=SMA(V2,2,1);
K3:=COUNT(ABS(C/REF(C,1)-1)*100>=6,30)>=P;
K4:=V<REF(V,1)*2.8 AND (COUNT(C<O*0.93,2)=2 OR COUNT(H/L>1.1,5)>3);
XG:(K1-K2);
BB:(XG<(0-S) AND (K4 OR K3))*10{,DOTLINE};
AA:0-S{,DOTLINE};
STICKLINE(XG<(0-S),AA,XG,6,0),COLORRED;

廿四){选股公式}
a:=EMA(C,20);
aa:=(a-REF(a,1))/REF(a,1)*100;
b:=SUM(VOL,10)/CAPITAL*100;
aa>=1.9 and aa<2 and b<10 or
aa>=1.9 and aa<2 and b<40 and b>30 or
aa>=1.9 and aa<2 and b<30 and b>20 or
aa>=1.9 and aa<2 and b<60 and b>50 or
aa>=1.8 and aa<1.9 and b<30 and b>20 or
aa>=1.8 and aa<1.9 and b<60 and b>50 or
aa>=1.8 and aa<1.9 and b<90 and b>80 or
aa>=1.8 and aa<1.9 and b<100 and b>90;

廿五){选股公式}
REF(O>C,2) AND REF(C,3)*0.95>=REF(C,2) AND REF(C>O,1) AND
REF(C,1)>=REF((O+C)/2,2) AND C>O AND C>REF(C,1) AND C>REF(O,2)
AND C>MA(C,5) AND C>MA(C,10) AND C>MA(C,20) AND C>MA(C,60)
AND REF(O/C>=1.03,2);

 

  评论这张
 
阅读(74)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017