beyond202104 发表于 2023-8-28 16:32:14

CMACD(通达信公式 副图 源码 测试图)


{CMACD 参数:N=14 SHORT=12 LONG=26 M=9} TYP := (HIGH + LOW + CLOSE)/3;CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));DIFF : EMA(CCI,SHORT) - EMA(CCI,LONG); DEA : EMA(DIFF,M);MACD : 2*(DIFF-DEA), COLORSTICK;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);面积:SMACD,COLORRED,NODRAW ;MACDHS:=IF(MACD>0 AND MACD>REF(MACD,1),MACD,0);MACDHX:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);MACDLX:=IF(MACD<0 AND MACD<REF(MACD,1),MACD,0);MACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);STICKLINE(MACDHS>0,0,MACD,1,0),COLOR0000EE;STICKLINE(MACDHS>0,0,MACD,1,0),COLOR0000FF;STICKLINE(MACDHS>0,0,MACD,1,0),COLOR0033FF;STICKLINE(MACDHS>0,0,MACD,1,0),COLOR3355FF;STICKLINE(MACDHS>0,0,MACD,1,0),COLOR6677FF;STICKLINE(MACDHS>0,0,MACD,1,0),COLOR8888FF;STICKLINE(MACDHS>0,0,MACD,1,0),COLOR9999FF;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR0099CC;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR00AADD;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR00BBDD;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR00CCEE;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR00DDEE;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR00EEFF;STICKLINE(MACDHX>0,0,MACD,1,0),COLOR00FFFF;STICKLINE(MACDLX<0,MACD,0,1,0),COLOR990000;STICKLINE(MACDLX<0,MACD,0,1,0),COLORAA2200;STICKLINE(MACDLX<0,MACD,0,1,0),COLORBB4400;STICKLINE(MACDLX<0,MACD,0,1,0),COLORCC7700;STICKLINE(MACDLX<0,MACD,0,1,0),COLORDD9900;STICKLINE(MACDLX<0,MACD,0,1,0),COLOREEBB00;STICKLINE(MACDLX<0,MACD,0,1,0),COLORFFCC00;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR005500;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR007700;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR009900;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR00BB00;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR00DD00;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR00EE00;STICKLINE(MACDLS<0,MACD,0,1,0),COLOR00FF00; VAR3:=IF(MACD>0,HHV(ABS(MACD),BC),LLV(MACD,BC));VAR4:=(MACD)/20;{图形比例缩小1/20,可修改}

VAR5:=SMACD;




Bey_Saher 发表于 2023-9-18 10:50:41

感谢!

9099 发表于 2024-1-9 16:14:32

不容易啊!好东西!

无止境游走靡 发表于 2024-1-14 19:32:51

好人啊!

男子汉的执着蒙 发表于 2024-2-7 06:47:49

楼主好人一个!

咏春学徒篮 发表于 2024-3-19 07:43:57

只为积分!感谢!

风残殒落殒d 发表于 2024-3-24 14:27:01

沙发,多多点赞好好学习
页: [1]
查看完整版本: CMACD(通达信公式 副图 源码 测试图)