M1 := EMA( CLOSE, 9 );
M2 := EMA( CLOSE, 18 );
MD1:= M1 - M2, COLORWHITE, LINETHICK3;
MM := EMA( MD1, 3 );
p31:=barslast(cross(MD1,MM));
p41:=barslast(cross(MM,MD1));
吸拉:=if(p31<p41,p31+1,0),COLORYELLOW,LINETHICK0;
p3:=barslast(cross(MM,MD1));
p4:=barslast(cross(MD1,MM));
派落:=if(p3<p4,p3+1,0),COLORGRAY,LINETHICK0;
吸:吸拉>0 AND MD1<0,COLORMAGENTA,LINETHICK0;
拉:=吸拉>0 AND MD1>0,COLORRED,LINETHICK0;
p33:=barslast(cross(拉,0.5));
p43:=barslast(cross(0.5,拉));
拉:if(p33<p43,p33+1,0),COLORRED,LINETHICK0;
派:派落>0 AND MD1>0,COLORGREEN,LINETHICK0;
落:派落>0 AND MD1<0,COLORWHITE,LINETHICK0;
PARTLINE( MD1>=MM AND MD1<0,MD1),COLORMAGENTA, LINETHICK3;
PARTLINE( MD1 >= MM AND MD1 >= 0,MD1),COLORRED, LINETHICK4;
PARTLINE( MD1 < MM AND MD1 >= 0,MD1), COLORGREEN, LINETHICK3;
PARTLINE( MD1 < MM AND MD1 < 0,MD1),COLORWHITE, LINETHICK3;