第一个公式:要求upper,lower,ene指标线均向上,收盘价下破lower线n:=25;m1:=6;m2:=6;upper:=(1+m1/100)*ma(close,n);lower:=(1-m2/100)*ma(close,n);ene:=(upper+lower)/2;x1:=upper>=ref(upper,1) and lower>=ref(lower,1) and en...
diff:=ema(close,12)-ema(close,26);dea:=ema(diff,9);macd:=2*(diff-dea);sx:=barslast(cross(dea,diff))+1;jx:=barslast(cross(diff,dea))+1;t1:=if(jx=1 and diff>ref(diff,ref(jx,1)+1),1,0);t2:=if(jx=1 and...
这里设悬赏,不允许回答,是不太公平的。{个人看法}{ene-xg}upper:=(1+3{10}/100)*ma(close,7{9});lower:=(1-3{10}/100)*ma(close,7{9});ene:=(upper+lower)/2;自加: ref(c,1)<lower and cross(c,ene);
写这个公式首先要定义横盘的概念,按最大振幅10%定义公式如下:atr:=hhv(high,22)-llv(low,22);tj1:=atr/close*100<10;tj2:=cross(ma(vol,5),ma(vol,22));tj3:=cross(macd.dif,macd.dea);tj4:=cross(kdj.k,kdj.d);选股:tj1 and tj2 and tj3 and ...