n:=20;dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2;v1:=c>ref(c,1)*1.04 and c>0;tj1:=dif>0 and abs(macd)<0.01 and v>ma(v,n) and c>=ref(c,barslast(v1)) ;tj2:=filter(close>ref(hhv(high,100),1)and ref(c,1)<ref(hhv(high,100),1),5)and ex**t(every(c>ema(c,120),30),100)and c/ema(c,100)<1.5;xg:tj1 or tj2; 20210311
n:=20;d:=5;boll:=ma(close,n);ub:=boll+2*std(close,n);lb:=boll-2*std(close,n);xg:count(range(c,lb,boll)=1,d) and lb>ref(lb,1) and ref(lb,1)<ref(lb,2);{d:为收盘价在中轨和下轨间运行天数(我设为5天,自己可改),下轨第一天转头向上时进行选股...
你这指标公式有未来函数小心用,varf:=trou**ars(3,15,1)<4;机构:=ema((close-ma((2*close+high+low)/4,30))/ma((2*close+high+low)/4,30)*100,3),colorwhite;m1:=filter(varf=1,5) and 机构<-10;m2:=filter(varf=1,5)m3:if(m1,1,...