pn1:=dyna**(8)>0;pn2:=dyna**(17)>0;pn3:=dyna**(22)>0;pn4:=dyna**(23)>0;st:=if(namelike('st')=1,0,if(namelike('s st')=1,0,if(namelike('*st')=1,0,1))); 去除:= pn1*pn2*pn3*pn4*st; {只选非st类和当天非停牌的股------用于配合选股公式};diff:=ema(close,3)-ema(close,8);x1:=ema(diff,5)*5;x2:=((ema(close,3)-ema(close,8)))*5;zrxg1:=cross(x2,x1) and x2>0;lc:=ref(close,1);sg:=ema(hhv(high,1),8);xx1:=ema(close,8);x30:=((xx1 < ref(xx1,1)) and (close <xx1));x31:=if(((sg < ref(sg,1)) or x30),1,0);操作线:=sma(max(close-lc,0),2,1)/sma(abs(close-lc),2,1)*100;震仓线:=45,colormagenta;抄底线:=20;pp:=操作线<震仓线 and ref(操作线,1)>震仓线 ;pp3:=操作线<抄底线 and ref(操作线,1)>抄底线;抓牛:=(((((count((x31 = 1),4) = 3) and (x31 = 0))and o<c and (((c-ref(c,1))/ref(c,1))>0.035))*89) >=89)or((c-ref(c,1))/ref(c,1)>0.035 and (ref(pp3,1) or ref(pp,1))) ;xg:zrxg1 and 抓牛 and 去除;(这个公式是两个条件都的选股) 20210311
{假设阴线幅度>7%,根据需要修改} dyx:=(c-o)/ref(c,1)*100;days:=barslast(dyx);mid:=(ref(c,days)+ref(o,days))/2;欲反包:days>1 and days< 5 and c >mid and count(c>mid,days)=1;
ma1:=ma(close,m1);ma2:=ma(close,m2);ma3:=ma(close,m3);ma4:=ma(close,m4);(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));{已测试,复制可直接引用,m...
vv:=(high+open+low+close)/4;上拐5日:=(ma(vv,5)>=ref(ma(vv,5),1));上拐10日:=(ma(vv,10)>=ref(ma(vv,10),1));上拐20日:=(ma(vv,20)>=ref(ma(vv,20),1));均线a:=上拐5日+上拐10日+上拐20日;**线上跷:=(均线a=3 and ref(均线a,1));m1:...