本人比较喜欢的自用指标之一,看图一目了然,指标显示MACD周线金死叉和低位2次金叉,重点是做MACD主升段 赚多赔少,再附上选股公式和喜欢MACD的朋友们共享,喜欢的朋友记得顶一个哦,
{SHORT 2 200 12
LONG 2 200 26
MID 2 200 9}
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
{主升段}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA1:=EMA(DIFF,9);
MACD1:=2*(DIFF-DEA1),COLORSTICK,LINETHICK2;
趋势:=MA(MACD,1);
STICKLINE(MACD1>REF(MACD1,1) AND 趋势>0,0,MACD1,2,0),COLOR0000FF;
STICKLINE(MACD1>REF(MACD1,1) AND 趋势>0,0,MACD1,1.8,0),COLOR0000FF;
STICKLINE(MACD1>REF(MACD1,1) AND 趋势>0,0,MACD1,1.5,0),COLOR0000FF;
STICKLINE(MACD1>REF(MACD1,1) AND 趋势>0,0,MACD1,1.2,0),COLOR0000FF;
STICKLINE(MACD1>REF(MACD1,1) AND 趋势>0,0,MACD1,0.6,0),COLOR0000FF;
STICKLINE(MACD1>REF(MACD1,1) AND 趋势>0,0,MACD1,0.3,0),COLORCC66FF;
DRAWICON(MACD1>REF(MACD1,1) AND 趋势>0 ,趋势,1);
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,13);
DRAWTEXT(二次金叉,DEA*1,'低二叉'),COLORYELLOW;
周DIF:="MACD.DIF#WEEK"(12,26,9);
周DEA:="MACD.DEA#WEEK"(12,26,9);
周MACD:="MACD.MACD#WEEK"(12,26,9);
DIF周金叉:=CROSS(周DIF,周DEA);
DRAWTEXT(DIF周金叉,0,'周叉'),COLORYELLOW;
DRAWTEXT(CROSS(周DEA,周DIF),0,'周死'),COLORGREEN;
MACD周金叉:=CROSS(周MACD,周DIF) AND 周MACD>=(0-0.05) AND 周MACD<=0.02;
选股公式在这里
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
东方趋势:=MA(MACD,1);
MACD1:=(DIFF-DEA)*2;
XG:MACD1>REF(MACD1,1) AND 东方趋势>0 AND REF(东方趋势,1)<=0;