通达信MACD精准买卖副图指标 源码介绍
通达信MACD精准买卖副图指标 源码
通达信MACD精准买卖指标公式
说明:本指标是通达信MACD精准买卖指标公式。在原指标的基础上我增加了选股公式,顶底及中轴,并引入了均线系统(在指标的底部出现,由红,白,绿三色组成,它的含义是红色多头,绿色空头,白色为过渡区或叫观望区)。通过加入了这些元素,比较方便选股和看盘。
本指标实际上是macd和kdj的合成版本,比较以前的类似版本,界面清爽了许多。
macd历来有指标之王之美称,深入地研究它,正确地使用它,是制胜的关键。
其具体如何操作,这个问题比较复杂,我一时也讲不清楚,请谅解。只讲一点:0轴上方是否有红柱是判断多空的一个重要标志,它是多空博弈的结果。
请多关注上升趋势的股票,回避下降趋势的股票,能做到这点,那你就成功了一半。
当macd上拐等于1时即为选股,另外一个选股公式是蓝,红,黄(牛熊三色)同时有数据显示时也是选股。这些选股公式给出的选股结果及红绿箭头出现的买卖点仅供参考,不作为投资的依据。如何买卖还得参考大盘因素,成交量和其它指标综合研判。
本指标无未来函数。
N:=9;M1:=3;M2:=3;
VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR2:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR3:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(VAR2+2*VAR3+3*VAR4)/6;
VAR6:=MA(VAR5,3);
MACD: VAR6*5,COLORSTICK ,LINETHICK2 ;
提醒: STICKLINE(VAR6<=-6,0,-25,5,0), COLOR88B7EA ;
关注: STICKLINE(VAR6<=-8,5,25,7,0), ;
出击: STICKLINE(VAR6<=-10,80,100,5,0), coloryellow;
警戒雷达: IF(VAR6<-6,20,0),LINETHICK3 , COLORFF0000;
引导雷达: STICKLINE(VAR6<=-10,65,35,4,0),;
制导雷达: STICKLINE(VAR6<=-10,40,0,4,0), colorred;
发射: STICKLINE(VAR6<=-10,80,30,3,0), colorgreen;
导弹: STICKLINE(VAR6<=-10,80,60,3,0), colorwhite;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,LINETHICK2;
K:SMA(RSV,M1,1),LINETHICK1;
D:SMA(K,M2,1),LINETHICK1;
J:3*K-2*D,COLORFF00FF,LINETHICK1;
IF(J<0,J,DRAWNULL),colorgreen,LINETHICK2;
IF(K>90,K,DRAWNULL),COLOR0000FF,LINETHICK2;
IF(D>85,D,DRAWNULL),COLORFFFF11,LINETHICK2;
DRAWICON(CROSS(K,d),d,'buy');
DRAWICON(CROSS(d,k),k,'sell');
DRAWICON(CROSS(J,1),J,1);
DRAWICON(K>80 AND D>80 AND CROSS(D,K),D,2);
底: 20,LINETHICK1 , COLOR77AA1A;
中轴: 50,LINETHICK1 , colorcyan;
入顶: 80,LINETHICK1 , COLOR9966FF;
大顶: 100,LINETHICK1 ,COLOR22A6E6;
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(多转空,MACD,2);
DRAWICON(空转多,MACD,1);
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
选股:CROSS(MACD>0,0.5);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
蓝:IF(FILTER(YXF=1,5),20,0),colorliblue,LINETHICK3;
红: IF(FILTER(YXF=1,5),10,0),colorred,LINETHICK2;
黄: IF(FILTER(YXF=1,5),5,0),coloryellow,LINETHICK1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD上拐:REF(DEA,2)>REF(DEA,1) AND REF(DEA,1)<DEA;
过渡:IF(BBI,10,DRAWNULL),colorwhite,LINETHICK2;
持股:IF(C>BBI AND BBI>REF(BBI,1),10,DRAWNULL), colorred,LINETHICK2;
持币:IF(C<=BBI AND BBI<=REF(BBI,1),10,DRAWNULL),colorgreen,LINETHICK2;
gd46528