通达信MACD飘带副图指标公式
安装后如下图,友情提示(指标只是辅助,不作建议) 所有程序均为免费分享。
不会安装点击 安装指南 步骤操作。
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD := 2*(DIFF-DEA);
JC := DEA-DIFF;
ZERO : 0;
DRAWBAND(DIFF,RGB(200,50,55),DEA,RGB(50,100,10));
八十日漂红: COUNT(MACD>0,80),NODRAW;
连红: BARSLASTCOUNT(MACD>0),NODRAW;
连增:BARSLASTCOUNT(MACD>REF(MACD,1)),COLORRED,NODRAW;
连减:BARSLASTCOUNT(MACD<REF(MACD,1)),COLORGREEN,NODRAW;
绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(JC<0)),0);
红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);
本次最低价:=LLV(L,BARSLAST(JC<0));
本次最高价:=HHV(H,BARSLAST(JC>0));
X1:=IF (MACD<0,BARSLAST(CROSS(DIFF,DEA)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积)
AND 本次最低价<前次最低价 ),1,0);
RS1:= MACD<0 AND REF(MACD,1)<0 AND C<前次最低价
AND ABS(绿柱面积)<ABS(前次绿柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
遵:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED;
守:IF(DEA>=DIFF,DEA,DRAWNULL),COLORFF9900;
纪:IF(DIFF>=DEA,DEA,DRAWNULL),COLOR00FFFF;
律:IF(DEA>=DIFF,DIFF,DRAWNULL),COLOR00FF00;
X2:=IF (MACD>0,BARSLAST(CROSS(DEA,DIFF)),0);
前次红柱面积:=REF(红柱面积,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积 AND 本次最高价>前次最高价 ),1,0);
RS2:= MACD>0 AND REF(MACD,1)>0 AND C>前次最高价 AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,3,0),COLOR0000FF;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,3,0),COLORFFFF00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,3,0),COLORFF00FF;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,3,0),COLOR00FF00;
Y22:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积)),1,0);
XG2:=IF (CROSS(DIFF,DEA),REF(Y22,1),0);
红面积:SUM(MACD,BARSLAST(MACD<0))*(MACD>0),COLOR0000FF,NODRAW;
绿面积:SUM(MACD,BARSLAST(MACD>0))*(MACD<0),COLORFFFF00,NODRAW;
AA:=ROUND(REF(绿面积,1)*100);
BB:=ROUND(REF(红面积,1)*100);底背驰:= IF (CROSS(DIFF,DEA),REF(Y1,1),0);
DRAWTEXT(底背驰,0.20,'-'),COLOR00FFFF;
STICKLINE(底背驰,0,0.3,4,0),COLOR0000FF;
DRAWICON(底背驰,0,23),COLORYELLOW;
版权声明
所有指标均为免费分享。
文章内容来自互联网,本网站无任何收费项目也不推荐股票广告投放请自行识别风险。