Z_X4:=REF(EMA(C,N),BARSLAST(CROSS(0,Z_X2))+1);
IF(Z_X2 =0 AND Z_X3=REF(Z_X3,1),Z_X3,DRAWNULL),LINETHICK2,COLORRED;{//红--直线
}DRAWLINE(CROSS(Z_X2,0),Z_X1,CROSS(0,Z_X2),Z_X1,0),LINETHICK2,COLORRED;{//红--斜线
}IF(Z_X2 0 AND Z_X4=REF(Z_X4,1),Z_X4,DRAWNULL),LINETHICK2,COLORGREEN;{//绿--直线
}DRAWLINE(CROSS(0,Z_X2),Z_X1,CROSS(Z_X2,0),Z_X1,0),LINETHICK2,COLORGREEN;{//绿--斜线
}DRAWLINE(CROSS(0,Z_X2) OR CROSS(Z_X2,0),Z_X1,ISLASTBAR,Z_X1,0),LINETHICK2,COLORYELLOW;{ //黄--最后斜线}