股票指标
专业的通达信指标网站

用MACD思想写的通达信BBD指标

BBD指标,用法可以参考MACD的红柱拐点逃顶,绿柱拐点抄底,加入了背离信号提示,这个指标写的思路是可以借鉴一下的。

AL:=(C+L+H)/3;
AO:=SMA(AL,5,1)-SMA(AL,13,1);
BBD:=(AO-SMA(AO, 3,1))*100,COLORFFCCFF;
BBDA:SMA(BBD,5,2),COLORRED,LINETHICK0;
RSV1:=BBD;
RSV2:=BBDA;
{BBD彩色柱体}
BBD1:=IF(BBD>=REF(BBD,1),BBD,0);
BBD2:=IF(BBD<REF(BBD,1),BBD,0);
STICKLINE(BBD1,0,BBD,3,0),COLOR000088;
STICKLINE(BBD1,0,BBD,1.5,0),COLOR0000AA;
STICKLINE(BBD1,0,BBD,1,0),COLOR0000CC;
STICKLINE(BBD1,0,BBD,0.5,0),COLOR0000FF;
STICKLINE(BBD2,0,BBD,3,0),COLOR888800;
STICKLINE(BBD2,0,BBD,1.5,0),COLORAAAA00;
STICKLINE(BBD2,0,BBD,1,0),COLORCCCC00;
STICKLINE(BBD2,0,BBD,0.5,0),COLORFFFF00;
SV1:=BARSLAST(REF(CROSS(RSV1,RSV2),1));
SV1A:=REF(CLOSE,SV1+1)>CLOSE AND RSV1>REF(RSV1,SV1+1) AND CROSS(RSV1,RSV2);
上涨BBD:=IF(SV1A,RSV2,0),COLORRED;
DRAWTEXT(SV1A,RSV2,'─B底背'),COLOR0033FF;
SV2:=BARSLAST(REF(CROSS(RSV2,RSV1),1));
SV2A:=REF(CLOSE,SV2+1)<CLOSE AND REF(RSV1,SV2+1)>RSV1 AND CROSS(RSV2,RSV1);
下跌BBD:=IF(SV2A,RSV2,0),COLORFFFF00;
DRAWICON(((((LLV(BBD,4) > 0) AND (BBD < REF(BBD,1)))
AND (REF(BBD,1) > REF(BBD,2))) AND (REF(BBD,2) > REF(BBD,3)))
,BBD,2);
DRAWICON(((((HHV(BBD,4) < 0) AND (BBD > REF(BBD,1)))
AND (REF(BBD,1) < REF(BBD,2))) AND (REF(BBD,2) < REF(BBD,3))),BBD,1);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26)*10;
DEA:=EMA(DIF,9);
上涨:(DIF-DEA)*2,COLOR0000EE,LINETHICK0;
下跌:上涨,COLORCYAN,LINETHICK0;
多空:=EMA((CLOSE-MA((2*CLOSE+HIGH+LOW)/4,30))
/MA((2*CLOSE+HIGH+LOW)/4,30)*100,3),LINETHICK1,COLORWHITE;
明天见底:FILTER(CROSS(多空,0),10),COLORFF00FF;
赞(0) 打赏
指标公式仅供学习研究,请勿以此为依据进行股票交易,依此入市,盈亏自负。股票指标 » 用MACD思想写的通达信BBD指标

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏