short:=9;mid:=12;long:=25;dif:=ema(close,short)-ema(close,long);dea:=ema(dif,mid);macd:=(dif-dea)*2;macd金叉:=cross(dif,dea);macd1次日:= barslast(macd金叉);macd2次日:= ref(macd1次日,macd1次日+1)+macd1次日;均线金叉:= cross(ma(c,120),ma(c,250));均线金叉日:=barslast(均线金叉);xg: macd金叉 and macd2次日<均线金叉日 and 均线金叉日<120; 20210311
m20:=ma(c,20);m60:=ma(c,60);jc:=cross(m20,m60);ts:=barslast(jc);qj:=ref(min(o,c),ts);gl:=(c-qj)/qj*100;x:between(ts,1,n) and between(gl,-1,2) and ma(c,3)