找回密码
 立即注册

QQ登录

只需一步,快速开始

广告载入中...
查看: 2573|回复: 12

【通达信】新MACD(副图)-指标公式源码

  [复制链接]
发表于 2010-7-14 22:49 | 显示全部楼层 |阅读模式

马上注册,享用更多功能,让你轻松玩转本论坛。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
【通达信】新MACD(副图)-指标公式源码
P:=13;S:=5;M:=1;
DIFF:EMA(C,S)-EMA(C,P);
DEA:EMA(DIFF,M),COLORRED;
MACD:2*(DIFF-DEA),COLORSTICK;
P1:=P;S1:=S;
DIFF1:EMA(C,S1)-EMA(C,P1);
DEA1:EMA(DIFF,M),COLORRED;
MACD1:=2*(DIFF1-DEA1),COLORSTICK;
MACD2:=DEA;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
R/4,POINTDOT,COLORFFFF00;
R/2,POINTDOT,COLORFFFF00;
R/4*3,POINTDOT,COLORFFFF00;
-R/4,POINTDOT,COLORFFFF00;  -R/2,POINTDOT,COLORFFFF00;
-R/4*3,POINTDOT,COLORFFFF00;
10071407596c5d4d1223af554e.png

评分

1

查看全部评分

发表于 2010-7-14 22:56 | 显示全部楼层


回复

使用道具 举报

发表于 2010-7-14 23:33 | 显示全部楼层
回复

使用道具 举报

发表于 2010-7-15 16:08 | 显示全部楼层
发帖符合规定要求,鼓励一下
回复

使用道具 举报

发表于 2010-7-15 17:01 | 显示全部楼层
谢谢分享。。。。。。
回复

使用道具 举报

发表于 2012-8-23 15:31 | 显示全部楼层
谢谢奉献,支持高手!
回复

使用道具 举报

发表于 2012-10-25 08:28 | 显示全部楼层
谢谢,向你学习
回复

使用道具 举报

发表于 2012-10-25 08:30 | 显示全部楼层
回复

使用道具 举报

发表于 2012-10-25 08:34 | 显示全部楼层
回复

使用道具 举报

发表于 2014-5-23 16:36 | 显示全部楼层
学习一下啦
回复

使用道具 举报

发表于 2021-2-27 16:15 | 显示全部楼层

好好学习好好学习
回复

使用道具 举报

发表于 2021-2-28 09:13 | 显示全部楼层
【通达信】新MACD(副图)-指标公式源码
P:=13;S:=5;M:=1;
DIFF:EMA(C,S)-EMA(C,P);
DEA:EMA(DIFF,M),COLORRED;
MACD:2*(DIFF-DEA),COLORSTICK;
P1:=P;S1:=S;
DIFF1:EMA(C,S1)-EMA(C,P1);
DEA1:EMA(DIFF,M),COLORRED;
MACD1:=2*(DIFF1-DEA1),COLORSTICK;
MACD2:=DEA;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
R/4,POINTDOT,COLORFFFF00;
R/2,POINTDOT,COLORFFFF00;
R/4*3,POINTDOT,COLORFFFF00;
-R/4,POINTDOT,COLORFFFF00;  -R/2,POINTDOT,COLORFFFF00;
-R/4*3,POINTDOT,COLORFFFF00;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|股海明灯官网 ( 京ICP备18020431号 )

GMT+8, 2024-11-13 11:31 , Processed in 0.125275 second(s), Total 14, Slave 13 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表