有头有尾
MA5:MA(CLOSE,5),COLORFFFFFF;
MA10:MA(CLOSE,10),LINETHICK2,COLOR00FFFF;
MA20:MA(CLOSE,20),COLOR00FF00;
MA40:MA(CLOSE,40),COLORFF00FF;
MA60:MA(CLOSE,60),COLOR0000FF;
MA120:MA(CLOSE,120),COLORFFFF00;
龙头:=EMA(CLOSE,2),COLOR000000;
龙尾:=EMA((SLOPE(CLOSE,21))*(20) + CLOSE,42),POINTDOT,COLOR000000;
买入:=CROSS(龙头,龙尾);
卖出:=CROSS(龙尾,龙头);
DRAWTEXT(买入,(LOW)*(0.97),'抓龙头'),COLOR00FFFF;
DRAWTEXT(卖出,(HIGH)*(1.03),'清龙尾'),COLORFFFFFF;
STICKLINE((龙头 >= 龙尾),LOW,HIGH,0.1,0),COLOR0000FF;
STICKLINE((龙头 >= 龙尾),CLOSE,OPEN,4.5,0),COLOR0000AA;
STICKLINE((龙头 >= 龙尾),CLOSE,OPEN,3,0),COLOR0000CC;
STICKLINE((龙头 >= 龙尾),CLOSE,OPEN,2,0),COLOR0000DD;
STICKLINE((龙头 >= 龙尾),CLOSE,OPEN,1,0),COLOR0000FF;
STICKLINE((龙头 < 龙尾),CLOSE,OPEN,1,0),COLOREEEE00;
STICKLINE((龙头 < 龙尾),CLOSE,OPEN,2,0),COLORDDDD00;
STICKLINE((龙头 < 龙尾),CLOSE,OPEN,3,0),COLORCCCC00;
STICKLINE((龙头 < 龙尾),CLOSE,OPEN,4.5,0),COLORAAAA00;
STICKLINE((龙头 < 龙尾),LOW,HIGH,0.1,0),COLORFFFF00;
STICKLINE(CROSS(龙头,龙尾) OR CROSS(龙尾,龙头),OPEN,CLOSE,3.5,0),COLOR00FFFF