mtr:=expmema(max(max(high-low,abs(high-ref(close,1))),abs(ref(close,1)-low)),14);hd :=high-ref(high,1);ld :=ref(low,1)-low;dmp:=expmema(if(hd>0&&hd>ld,hd,0),14);dmm:=expmema(if(ld>0&&ld>hd,ld,0),14);pdi:=dmp*100/mtr;mdi:=dmm*100/mtr;adx:=expmema(abs(mdi-pdi)/(mdi+pdi)*100,6);adxr:=expmema(adx,6);xg:cross(pdi,mdi) and cross(pdi,adx) and cross(pdi,adxr) and 100*(c-ref(c,1))/c>=5 and v>=2*ema(v,10); 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天,自己可改),下轨第一天转头向上时进行选股...
金包:trou**ars(3,15,1)=0 and high>low+0.01;说明:这个公式是不能在当天出信号的,因为trou**ars函数要看第二天脸色,要用于选股就要选择历史时段,即看前几日内出现过信号的你可以做成副图看看 --------------------------------------------------------这样改一下也许有点用金包:trou**ars(3,...