XA_2:=(20*XA_1+19*REF(XA_1,1)+18*REF(XA_1,2)+17*REF(XA_1,3)+16*REF(XA_1,4)+15*REF(XA_1,5)+14*REF(XA_1,6)+13*REF(XA_1,7)+12*REF(XA_1,8)+11*REF(XA_1,9)+10*REF(XA_1,10)+9*REF(XA_1,11)+8*REF(XA_1,12)+7*REF(XA_1,13)+6*REF(XA_1,14)+5*REF(XA_1,15)+4*REF(XA_1,16)+3*REF(XA_1,17)+2*REF(XA_1,18)+REF(XA_1,20))/210;
XA_3:=MA(AMOUNT,6)>MA(AMOUNT,12) AND MA(AMOUNT,12)>MA(AMOUNT,24);
COUNT(REF(NOT(XA_3),1) AND XA_3,30)>=2 AND XA_3 AND MACD.DEA>0 AND CROSS(MACD.DIF,MACD.DEA) AND CROSS(XA_1,XA_2);