通达信MACD面积公式

{MACD面积}

P:=26;S:=12;M:=9;

DIFF:EMA(C,S*放大比例) – EMA(C,P*放大比例);

DEA:EMA(DIFF,M*放大比例);

MACDB:2*(DIFF-DEA),COLORSTICK;

BV:=SUM(MACDB,0);

BA:=IF(MAX(BV,REF(BV,2))<REF(BV,1) OR MIN(BV,REF(BV,2))>REF(BV,1),1,0);

BC:=BARSLAST(BA)+1;

SMACD:=BV-REF(BV,BC);

VAR3:=IF(MACDB>0,HHV(ABS(MACDB),BC),LLV(MACDB,BC));

VAR4:=(MACDB)/20;{图形比例缩小1/20,可修改}

面积1:=ROUND(SMACD*100),NODRAW;

面积:SMACD*100,NODRAW;

 

DRAWNUMBER(REF(VAR4,1)>0 AND VAR4<=0 ,REF(VAR3,1)*0.9,REF(面积1,1)),COLORGREEN;

DRAWNUMBER(REF(VAR4,1)<0 AND VAR4>=0 ,REF(VAR3,1)*0.9,REF(ABS(面积1),1)),COLORFF00FF;

DRAWNUMBER(ISLASTBAR AND VAR4<0,REF(VAR3,1)*0.9,ABS(面积1)),COLORFF00FF;

DRAWNUMBER(ISLASTBAR AND VAR4>0,REF(VAR3,1)*0.9,面积1),COLORGREEN;

 

M1:=REF(MACDB,1);

STICKLINE(MACDB>0 AND MACDB<=M1,0,MACDB,0,0),COLORYELLOW;

STICKLINE(MACDB<0 AND MACDB>=M1,0,MACDB,0,0),COLORWHITE;

IF(DIFF>=REF(DIFF,1),DIFF,DRAWNULL),COLORGREEN,LINETHICK2;

人已赞赏
炒股秘笈

什么是净利润断层选股法?《净利润断层:一种高效的选股策略》pdf免费下载

2020-8-6 4:02:52

个股点评

亚玛顿、凯盛科技:华为Mate Xs将采用超薄玻璃盖板 超薄玻璃概念股有那些?

2019-12-26 17:27:36

个人中心
今日签到
有新私信 私信列表
搜索