DIF:EMA(CLOSE,223)-EMA(CLOSE,479);
DEA:EMA(DIF,135);
MACD:(DIF-DEA)*2,COLORSTICK;
AA:DIF,COLORBLUE,LINETHICK2;
AA升:IF(AA>REF(AA,1),AA,DRAWNULL),COLORRED,LINETHICK2;
AA平:IF(AA<REF(AA,1),AA,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
STICKLINE(MACD<REF(MACD,1) AND MACD>0,MACD-0.05,MACD,0.1,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD+0.05,MACD,0.1,0),COLORWHITE;
解答如下:
DIF:EMA(CLOSE,223)-EMA(CLOSE,479);
DEA:EMA(DIF,135);
MACD:(DIF-DEA)*2,COLORSTICK;
AA:DIF,COLORBLUE,LINETHICK2;
AA升:partline(AA>REF(AA,1),AA),COLORRED,LINETHICK2;
AA平:partline(AA<REF(AA,1),AA),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
STICKLINE(MACD<REF(MACD,1) AND MACD>0,MACD-0.05,MACD,0.1,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD+0.05,MACD,0.1,0),COLORWHITE;