{趋势线}
VAR1:=(C+H+O+L)/4;
卖出:EMA(VAR1,15)*(1+2/25),COLORGREEN,LINETHICK2;
买入:EMA(VAR1,25)*(1-1/10),COLORMAGENTA,LINETHICK2;
{红绿线}
A:=EMA(CLOSE,7)-EMA(CLOSE,21);
B:=EMA((0.668*REF(A,1)+0.333*A),3);
{均线}
买线:=EMA(C,5);
卖线:=EMA(SLOPE(C,20)*10+C,40);
{增幅线}
EMA14:=EMA(C,14);
增幅%:(EMA14-REF(EMA14,1))/REF(EMA14,1)*100,NODRAW;
{指示}
买:=C>=EMA(C,5) AND A>B AND B>REF(B,1) AND 增幅%>0 AND 买线>=卖线 AND 卖出>REF(卖出,1);
卖:=C<EMA(C,5) OR A<=B OR 增幅%<0 OR 买线<卖线 OR 卖出<=REF(卖出,1);
STICKLINE(买,LOW*0.99,LOW*0.97,2.9,0),COLORYELLOW;
STICKLINE(卖,LOW*0.99,LOW*0.97,2.9,0),COLORBLUE;
初涨点:IF(增幅%>=0,REF(EMA(C,14),BARSLAST(CROSS(增幅%,0))+1),DRAWNULL)COLORRED,LINETHICK1;
初跌点:IF(增幅%<0,REF(EMA(C,14),BARSLAST(CROSS(0,增幅%))+1),DRAWNULL)COLORGREEN,LINETHICK1;
累计涨幅%:IF(增幅%>=0,(C-初涨点)/初涨点*100,DRAWNULL)COLORFF00FF,NODRAW;
累计跌幅%:IF(增幅%<0,(C-初跌点)/初跌点*100,DRAWNULL)COLORGREEN,NODRAW;
STICKLINE(CROSS(增幅%,0),C,O,2,0)COLORFF00FF;
STICKLINE(CROSS(0,增幅%),C,O,2,0)COLORGREEN;
STICKLINE(CROSS(增幅%,0) OR CROSS(0,增幅%),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,2,0)COLORWHITE;