n{2.90.9}m1{2.30.3}m2{2.30.3}rsv:=(close-llv(low,n))/(hhv(high,n)-llv(low,n))*100;k:=sma(rsv,m1,1);d:=sma(k,m2,1);j:=3*k-2*d;金叉:=barslastcount( j>k and k>d)=1;diff :=(ema(close,12)-ema(close,26))*100/...
ma65:=ma(c,65);ma250:=ma(c,250);bb:count(cross(ma(c,65),ma(c,250)),250);xg:=ma250>ref(ma65,1);cross(ma250,ma65) and xg and bb;cross(ma250,ma65) and xg and bb;这句错误,不知道你想表达的意思。bb大于0的情况下,那么cross(ma250...
dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd0:=(dif-dea)*2;x0:=barslast(cross(dif,dea));xg:if(x0=0 and dif>ref(dif,ref(x0,1)+1)and l(l,ref(x0,1)+1),1,0);公式里的macd金叉低点对比用macd的dif值做的对比,