H1: EMA(CLOSE,6),colormagenta;
H2: EMA(H1,18),coloryellow;
H3: EMA(CLOSE,108),colorgreen,nodraw;
升:IF(H3>=REF(H3,1),H3,DRAWNULL),colorred;
降:IF(H3<REF(H3,1),H3,DRAWNULL),colorgreen;
STICKLINE(H1>H2,H1,H2,3,0),colorwhite;
STICKLINE(H1>H2 AND H2>H3,H1,H2,3,0),colorred;
STICKLINE(H1<H2,H1,H2,3,0),colorblue;
STICKLINE(CROSS(H1,H2),0.95*H2,1.1*H1,1.5,0),coloryellow;
DRAWTEXT(CROSS(H1,H2),0.95*H2,'金叉'),coloryellow;
STICKLINE(CROSS(H2,H3),0.95*H3,1.1*H1,1.5,0),colormagenta;
DRAWTEXT(CROSS(H2,H3),0.95*H3,'金叉'),colormagenta;