MACD的买卖信号
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

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);

选股票看什么指标最好 >股票指标网