通达信:
MA5:MA(C,5) ,COLORWHITE; MA20:MA(CLOSE,20),COLORMAGENTA; MA60:MA(CLOSE,60),COLORYELLOW; IF(MA5<REF(MA5,1),MA5,DRAWNULL),COLORGREEN; IF(MA20<REF(MA20,1),MA20,DRAWNULL),COLORGREEN; IF(MA60<REF(MA60,1),MA60,DRAWNULL),COLORGREEN; DRAWICON(CROSS(C,MA5),L*0.96,5); DRAWICON(CROSS(MA5,C),H*1.03,6);
效果图如上:均线向下时都显示为绿色,向上时显示为正常初始设置颜色;
飞狐交易师:
Ma5:ma(c,5) ,colorwhite; Ma20:ma(close,20) ,colormagenta; Ma60:ma(close,60),coloryellow; Partline(ma5<ref(ma5,1),ma5),colorgreen; Partline(ma20<ref(ma20,1),ma20),colorgreen; Partline(ma60<ref(ma60,1),ma60),colorgreen; Drawicon(cross(c,ma5),l*0.98,10); Drawicon(cross(ma5,c),h*1.02,11);
效果图如下:
|