{}
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
DD1:=1+BarsLast(Cross(DIFF,DEA) AND DIFF<0 AND DEA<0);
DD2:=1+BarsLast(Cross(DEA,DIFF) AND DIFF<0 AND DEA<0);
C1:=DD1<26;
C2:=DD2<DD1;
C3:=Cross(Count(MACD>Ref(MACD,1) AND MACD<0,DD2),0.8);
C1 AND C2 AND C3;