dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2;xg1:=ref(dif,1)=ref(dea,1) and macd>ref(macd,1) and v>ref(v,1)*1.5 and cross(c,ma(c,20)) and ma(v,5)>ma(v,10);xg2:=ref(barslastcount(macd>0 and macd<ref(macd,1)),1)>2 and macd>ref(macd,1) and v>ref(v,1)*1.5 and c>ma(c,20) and ma(v,5)>ma(v,10);xg:xg1 or xg2; 20210311
dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2;天数:=barslast(ref(cross(dea,dif) and dif>0,1));macd背离:=cross(dea,dif) and dif<ref(dif,天数+1);xg:cross(kdj.k,kdj.j) and dif>0 a...