买线:=EMA(CLOSE,2);
卖线:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWTEXT(BU,(LOW - 0.1),'买入'),COLORYELLOW;
DRAWTEXT(SEL,(HIGH + 0.1),'S★卖出'),COLORGREEN;
STICKLINE((买线 >= 卖线),LOW,HIGH,0,1),COLORRED;
STICKLINE((买线 >= 卖线),CLOSE,OPEN,3,1),COLORRED;
STICKLINE((买线 < 卖线),CLOSE,OPEN,3,0),COLORCYAN;
STICKLINE((买线 < 卖线),LOW,HIGH,0,1),COLORCYAN;