联系方式 Contact

云指标公式网

淘宝:zb-mart.taobao.com

电话:18020657357

Q Q:396950280

网址:www.yzhibiao.com

搜索 Search

MACD面积指标

2015-1-16 13:15:25点击:

 

{MACD面积}
P:=12;S:=26;M:=9;
DIFF:EMA(C,P) - EMA(C,S);
DEA:EMA(DIFF,M);
MACD值:2*(DIFF-DEA),COLORSTICK,COLORRED; 
BV:=SUM(MACD值,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(MACD值>0,HHV(ABS(MACD值),BC),LLV(MACD值,BC));
VAR4:=(MACD值)/20;{图形比例缩小1/20,可修改}
面积:SMACD,NODRAW;
DRAWNUMBER(REF(VAR4,1)>0 AND VAR4<=0 ,REF(VAR3,1),REF(面积,1)),COLORMAGENTA;
DRAWNUMBER(REF(VAR4,1)<0 AND VAR4>=0 ,REF(VAR3,1),REF(ABS(面积),1)),COLORGREEN;
DRAWNUMBER(ISLASTBAR AND VAR4<0,REF(VAR3,1),ABS(面积)),COLORMAGENTA;
DRAWNUMBER(ISLASTBAR AND VAR4>0,REF(VAR3,1),面积),COLORGREEN;