A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
HJX21:=(21*A+20*REF(A,1)+19*REF(A,2)+18*REF(A,3)+17*REF(A,4)+16*REF(A,5)+
15*REF(A,6)+14*REF(A,7)+13*REF(A,8)+12*REF(A,9)+11*REF(A,10)+
10*REF(A,11)+9*REF(A,12)+8*REF(A,13)+7*REF(A,14)+6*REF(A,15)+
5*REF(A,16)+4*REF(A,17)+3*REF(A,18)+2*REF(A,19)+
REF(A,21))/231;
HJX3:=(3*A+2*REF(A,1)+REF(A,2))/6;
DC1:=EMA(HJX3,4),COLORLIMAGENTA;
DC2:=EMA(DC1,3),COLORRED;
DC3:=EMA(DC1,7),COLORRED;
DC4:=EMA(HJX21,6),COLORYELLOW,LINETHICK2;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
macd:=2*(DIFF-DEA);
XG0:=crOSS(MacD,0);
XG1:=CROSS(CLOSE,DC1) AND CROSS(CLOSE,DC2) AND CROSS(CLOSE,DC3) AND BArslAst(XG0)<=5 AND CLOSE