在线检测未来函数

把五里短线指标出现短B、反弹、BIAS、金牛时改成选股

来源:Internet,编辑:股旁网,2012-10-23

编写要求:

先把源码放在这啊,明天再来答谢。有三组公式,三个买点,麻烦把出现“短B、反弹、BIAS、金牛”等字样,只要出现任意一个字样弄成一个选股公式,谢谢。 五里短线原码: {多空短线买点} VAR1:=(H+L+O+3*C)/6; WLT:=EMA(VAR1,3); WLTA:=EMA(WLT,1),COLORFFFFFF; 空:HHV(MA(H,3),2),LINETHICK2,COLOR00DD00; 多:LLV(MA(H,3),1),LINETHICK2,COLOR0000DD; JCBT:=LAST(多<空,9,1) AND 多=空; STICKLINE(JCBT,O,(O+C)/2,4,0),COLOR0000FF; DRAWTEXT(JCBT,L*0.98,'短B'),COLOR0000FF; {超跌反弹买点} VARA:=(C-REF(O,21))/REF(O,21)*100; VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5); WLBT1:=V>=1.3*MA(V,5) AND REF(L,1)=LLV(L,55) AND VARA>=VARB AND VARA<-6.18; WLBT2:=V>=1.3*MA(V,5) AND CROSS(VARA,VARB) AND VARA<-10.18; WLBT:=WLBT1 OR WLBT2; DRAWTEXT(WLBT,L*0.98,'反弹'),COLOR00FFFF; STICKLINE(WLBT,C,O,3,0),COLOR00FFFF; {乖离共振买点} BIAS6:=(C-MA(C,6))/MA(C,6)*100; BIAS12:=(C-MA(C,12))/MA(C,12)*100; BIAS24:=(C-MA(C,24))/MA(C,24)*100; TJ1:=BIAS6<=-8; TJ2:=BIAS12<=-12; TJ3:=BIAS24<=-18; BBT:=(TJ1 AND TJ2 AND TJ3) OR (TJ1 AND TJ2 ) OR (TJ1 AND TJ3); BTJ5:=CROSS(BIAS6,-10); BTJ6:=CROSS(BIAS6,-6.2); BIASXG:=FILTER(BBT OR BTJ5 OR BTJ6,3); STICKLINE(BIASXG,C,O,0.11,0),COLOR0078FF; DRAWTEXT(BIASXG,L*0.98,'BIAS'),COLOR0078FF; {以上3组信号综合或共振买点} WLTBT:=COUNT(WLBT OR JCBT OR BIASXG,2); XG1:=WLTBT>=2; XG:=FILTER(XG1,3); DRAWTEXT(XG,L*0.99,'金牛'),COLOR00FFFF

股旁网解答:

 空:=HHV(MA(H,3),2);
多:=LLV(MA(H,3),1);
JCBT:=LAST(多<空,9,1) AND 多=空;
VARA:=(C-REF(O,21))/REF(O,21)*100;
VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);
WLBT1:=V>=1.3*MA(V,5) AND REF(L,1)=LLV(L,55) AND VARA>=VARB AND VARA<-6.18;
WLBT2:=V>=1.3*MA(V,5) AND CROSS(VARA,VARB) AND VARA<-10.18;
WLBT:=WLBT1 OR WLBT2;
BIAS6:=(C-MA(C,6))/MA(C,6)*100;
BIAS12:=(C-MA(C,12))/MA(C,12)*100;
BIAS24:=(C-MA(C,24))/MA(C,24)*100;
TJ1:=BIAS6<=-8;
TJ2:=BIAS12<=-12;
TJ3:=BIAS24<=-18;
BBT:=(TJ1 AND TJ2 AND TJ3) OR (TJ1 AND TJ2 ) OR (TJ1 AND TJ3);
BTJ5:=CROSS(BIAS6,-10);
BTJ6:=CROSS(BIAS6,-6.2);
BIASXG:=FILTER(BBT OR BTJ5 OR BTJ6,3);
WLTBT:=COUNT(WLBT OR JCBT OR BIASXG,2);
XG1:=WLTBT>=2;
XG:=FILTER(XG1,3);
JCBT or WLBT or BIASXG or XG;

相关文章