A:=(L+H+C*2)/4;
MA5:=EMA(A,5),COLORWHITE,LINETHICK1,DOTLINE;
MA10:EMA(A,10),COLORBLUE,LINETHICK1,DOTLINE;
MA20:MA(CLOSE,20),COLORMAGENTA,LINETHICK1,DOTLINE;
A2:=EMA(A,20),COLORLIBLUE,LINETHICK1;
A1X:=(MA5-REF(MA5,1))/REF(MA5,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
IF(MA20/REF(MA20,1)>=1,MA20,DRAWNULL),COLOR008888,LINETHICK1;
IF(MA20/REF(MA20,1)<1,MA20,DRAWNULL),COLORFF9150,LINETHICK1,DOTLINE;
买入持股:IF(A1X>=0,MA10,DRAWNULL),COLORRED,LINETHICK1;
卖出空仓:IF(A1X<0 AND A2X<0,MA10,DRAWNULL),COLORGREEN,LINETHICK1,DOTLINE;