MACD顶底背离(源码,图)

2011-03-01 18:44:00来源:本站整理浏览:314

{input:long(26,20,100),short(12,5,40),m(9,2,60)}
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA  : EMA(DIFF,M);
MACD : 2*(DIFF-DEA), COLORSTICK;
A44:=BARSLAST(ref(cross(DIFF,dea),1));
B11:=ref(c,A44+1)>c and ref(DIFF,A44+1)<difF and cross(DIFF,dea);
DRAWTEXT(FILTER(B11>0,5),difF,'底背离'),COLORyellow;
AA44:=BARSLAST(ref(cross(dea,DIFF),1));
BB11:=ref(c,AA44+1)<c and ref(dea,AA44+1)>dea and cross(dea,DIFF);
DRAWTEXT(FILTER(BB11>0,5),difF,'顶背离'),COLORyellow;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLORRED;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),0,MACD,2,0),COLORff9900;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLORYELLOW;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),0,MACD,2,0),COLORFFFF00;
多空绝对:0,LINETHICK1,color00aaaa;

 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式