九毛八公式指标
MACD指标,用了很久了,很不错的。但美中不足的是信号比较乱! 现在请老师帮我改下。把原有的信号去掉,改成金叉时出现笑脸,死叉时出现哭脸。 先谢谢了! 源码 A:EMA(CLOSE,9)-EMA(CLOSE,18); B:EMA(A,7),LINETHICK1; MACD:=2*(A-B); STICKLINE(MACD>=0,MACD,0,0,0),COLORF00FF0; STICKLINE(MACD<0,MACD,0,0,0),COLORF00FF0; STICKLINE(MACD0,0,MACD,0,0 ),COLORFFFF00; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0,0 ),COLORFFFF00; IF(A<0,A,0),COLORRED,LINETHICK1; IF(A<0,0,A),COLORRED,LINETHICK1; IF(AB,B,B),COLORWHITE,LINETHICK1; DRAWICON(LLV(MACD,4)>0 AND MACDREF(MACD,2) AND REF(MACD,2)>REF(MACD,3),MACD,2); DRAWICON(HHV(MACD,4)<0 and macd>REF(MACD,1) AND REF(MACD,1)公式模块:
A:EMA(CLOSE,9)-EMA(CLOSE,18);
B:EMA(A,7),LINETHICK1; macd:=2*(A-B); STICKLINE(MacD>=0,MACD,0,0,0),COLORF00FF0; STICKLINE(MACD<0,MACD,0,0,0),COLORF00FF0; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0,0 ),COLORFFFF00; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0,0 ),COLORFFFF00; IF(A<0,A,0),COLORRED,LINETHICK1; IF(A<0,0,A),COLORRED,LINETHICK1; IF(A<B,A,B),COLOR00FF00,LINETHICK1; IF(A>B,B,B),COLORWHITE,LINETHICK1; DRAWICON(crOSS(B,A)=1,B,2,1); DRAWICON(CROSS(A,B)=1,A,1,1);
0>