T:=BARSLAST(CROSS(MACD.MACD<0,0.5));
LT:=BARSLAST(L=LLV(L,T+1));
JT:=BARSLAST(CROSS(MACD.MACD>0,0.5));
LL:=LLV(L,T+1);
L1:=REF(LL,JT);
M1:=REF(MACD.MACD,JT);
L2:=REF(LL,SUMBARS(JT=0,2)-1);
M2:=REF(MACD.MACD,SUMBARS(JT=0,2)-1);
A:=REF(LT,1)=0 AND LT=1 AND REF(L,1)<L1 AND L2>L1;
A1:=REF(MACD.MACD,1)>M1 AND M1>M2;
XG:A AND A1;