网友求助:

DIFF金叉DEA后(在零轴上下均可)股价第一次跌幅超过2%,在下跌前有涨幅7%的阳线

 

解答如下:

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
ZF:=(C/REF(C,1)-1)*100;
t:=BARSLAST(ZF>7 AND diff>dea);
xg:CROSS(COUNT(ZF<-2,t)=1,0.5);