ma1:ma(close,5);ma2:ma(close,10);ma3:ma(close,20);ma4:ma(close,60);x:=barslast(v/ref(v,1)>2);aa:stickline(x>=0 and x,ref(c,x),ref(c,x),4,0)coloryellow,linethick2;
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值做的对比,