通达信MACD买卖副图指标公式源码
VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR7:=EMA(VAR6,5);
VAR8:=IF(VAR6<=-20,10,0);
STICKLINE(VAR8=10,20,10,5,0),COLOR6666FF;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100,COLORWHITE,LINETHICK1;
MACD买卖:(DIF-DEA)*0.666,COLORSTICK;
买:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
卖:=(ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG
STICKLINE((买=1),(-0.02),0,1,0),COLOR0000FF;
STICKLINE((卖=1),0.02,0,1,0),COLOR00FF00;
未来函数检测结果如下:
该公式包含未来函数:ZIG
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR3赋值:(收盘价-收盘价的6日简单移动平均)/收盘价的6日简单移动平均*100
VAR5赋值:(收盘价-收盘价的32日简单移动平均)/收盘价的32日简单移动平均*100
VAR7赋值:VAR6的5日指数移动平均
如果VAR6<=-20返回10否则返回0
当满足条件VAR8=10时,在20和10之间画柱状线
DIF赋值:(收盘价的12日指数移动平均-收盘价的26日指数移动平均)*100,画白色,LINETHICK1
输出MACD买卖:(DIF-DEA)*0.666,COLORSTICK
买:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
卖:=(ZIG(3,5)[=REF(ZIG(3,5),2)) AND (REF(ZIG
STICKLINE((买=1),(-0.02),0,1,0),COLOR0000FF]
STICKLINE((卖=1),0.02,0,1,0),COLOR00FF00
- QQ:88652583
- 邮箱:88652583@qq.com
- 工作时间:8:30-23:00
- 微信:88652583或扫描如下二维码
sitemap站点地图