rsv:=(close-llv(low,9))/(hhv(high,9)-llv(low,9))*100;k:=sma(rsv,3,1);d:=sma(k,3,1);j:=3*k-2*d;bias:=(close-ma(close,6))/ma(close,6)*100;biasma :=ma(bias,6);hbxg:cross(k,d) and cross(bias,biasma);{个人看法,仅供参考。} 20210311
买线:=ema(c,2);卖线:=ema(slope(c,21)*20+c,42);bu:=cross(买线,卖线);rsv:=(close-llv(low,9))/(hhv(high,9)-llv(low,9))*100;k:=sma(rsv,3,1);d:=sma(k,3,1);j:=3*k-2*d;xg:bu and cross(j,10); 已测试。
capital/100<=100000&&cross("kdj.k","kdj.d")&¬(namelike('s') or namelike('*s'))&&dyna**(17)!=0;===================第五个暂时没处理,你自己通过上述选取后自行判断。周期可以通过选股器中的选股周期来设置。
dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2;t1:=dif<=0 and dea<=0;a1:=barslast(dea>0);xg:t1 and count(cross(dea,dif),a1)=1 and cross(dea,dif);