通达信MACD夹心指标公式

2013-06-16 09:16:00来源:本站整理浏览:593

SHORT:=12;
LONG:=26;
MID:=9;
DIFF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIFF,MID);
MACD:(DIFF-DEA)*2,LINETHICK0;
STICKLINE(MACD>0,MACD,0,-1,1),COLORRED;
STICKLINE(MACD<0,MACD,0,-1,0),COLORCCCC00;
DRAWICON(ISLASTBAR=1 AND MACD>REF(MACD,1),HHV(MACD,42),1);
DRAWICON(ISLASTBAR=1 AND MACD<REF(MACD,1),HHV(MACD,42),2);
VAR1:=HHV(DEA,42);
VAR2:=LLV(DEA,42);
VAR3:=DEA-(DIFF-DEA);
VAR4:=DEA-(DIFF-DEA);
UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORBB9A00;
DN:IF(DIFF<VAR2 AND DEA=VAR2,MIN(HHV(VAR2,10),VAR4),VAR2),COLORAA00CC;
波↓:IF(DIFF<REF(DN,1),DIFF,DRAWNULL),COLOR00FF00,LINETHICK3;
波↑:IF(DIFF>REF(DN,1)AND DIFF<REF(UP,1),DEA,DRAWNULL),COLORFFFFFF,LINETHICK3;
☆DEA:IF(DIFF>REF(DN,1),DIFF,DRAWNULL),COLORFF00FF,LINETHICK3;


 


 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式