v1:=BARSLAST(ref(cross("macd.diff","macd.dea"),1));
MACD底背離:ref(c,v1+1)>c and ref("macd.diff",v1+1)<"macd.diff" and cross("macd.diff","macd.dea");
v2:=BARSLAST(ref(cross("macd.dea","macd.diff"),1));
MACD頂背離:ref(c,v2+1)>c and ref("macd.diff",v2+1)<"macd.diff" and cross("macd.dea","macd.diff");