H1:=EMA(CLOSE,6),colorwhite;
H2:=EMA(H1,18),colorwhite;
C55:=MA(C,55);
AA1:=IF( (H1>H2 AND C>=C55 AND C55>=REF(C55,1)) ,5,0);
AA2:=IF( (H1>H2 AND C>=C55 AND C55<REF(C55,1)),4,0);
AA3:=IF( (H1>H2 AND C<C55),1,0);
AA4:=IF( (H1<H2),0,0);
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,colorred;
MADKX:=MA(DKX,5),coloryellow;
AA5:=IF( (DKX> MADKX AND C>=C55 AND C55>=REF(C55,1)) ,5,0);
AA6:=IF( (DKX> MADKX AND C>=C55 AND C55<REF(C55,1)) ,4,0);
AA7:=IF( (DKX> MADKX AND C<C55) ,1,0);
AA8:=IF( (DKX< MADKX),0,0);
C01:5;
AA:AA1+AA2+AA3+AA4+AA5+AA6+AA7+AA8;
STICKLINE(AA=10,5,AA,5,0),colorred;
STICKLINE(AA>5 AND AA<10,5,AA,5,0),colorlired;
STICKLINE(AA>0 AND AA<5,5,AA,5,0),colorwhite;
STICKLINE(AA=0,0,5,AA,5,0),colorgreen;