rsv1:=(close-llv(low,9))/(hhv(high,9)-llv(low,9))*100;k:=sma(rsv1,3,1);d:=sma(k,3,1);j:=3*k-2*d;a1:=barslast(ref(cross(j,k),1));底背离:ref(c,a1+1)>c and j>ref(j,a1+1)and cross(j,k);
ema10:=ema(c,10);ema60:=ema(c,60);longcross(ema10,ema60,1)=1;注释:最后用的是正好当日金叉;如果加macd的话,建议先导入macd的源码,然后条件语句可改为 longcross(ema10,ema60,1)=1 and cross(macd,0)=1;