公式指标平台 股票指标公式源码分享 登录 注册
公式指标平台
未来函数检测
首 页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 操盘手公式 东财通公式 飞狐公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式指标平台 > 大智慧公式 > 正文 → 正文

MACD修改

发布时间:2013/11/21 6:29:39  浏览次数:

MACD修改

 

input:p(12,1,100),s(26,1,100),m(9,1,50),N(0,0,1);
周MACD:="MACD.MACD#WEEK";
STICKLINE(周MACD>=0 AND DATATYPE=8,0,周MACD,11,0),Color000055;
STICKLINE(周MACD<0 AND DATATYPE=8,0,周MACD,11,0),Color515100;
DIFF:(EMA(CLOSE,P) - EMA(CLOSE,S)),LINETHICK2;
DEA :EMA(DIFF,M),Color1AFFFF,LINETHICK2,LAYER0;
macd:(diff-dea)*2,COLORRED,LINETHICK0;

PARTLINE(DIFF,DIFF>=REF(DIFF,1),RGB(200,0,200),DIFF<REF(DIFF,1),RGB(0,200,200)),LAYER0;;
STICKLINE(macd>0 and macd>=REF(macd,1),macd,0,4,0),Color0000F2;
STICKLINE(macd>0 and macd<REF(macd,1),macd,0,4,1),Color0000F2;
STICKLINE(macd<0 and macd<REF(macd,1),macd,0,4,0),Color008000;
STICKLINE(macd<0 and macd>=REF(macd,1),macd,0,4,1),Color008000;
ES:=IF(N=0,REF(EMA(C,S),1),EMA(C,S));
EP:=IF(N=0,REF(EMA(C,P),1),EMA(C,P));
DI:=IF(N=0,REF(DIFF,1),DIFF);
零度价:=((P+1)*(S-1)*ES-(S+1)*(P-1)*EP)/(2*(S+1)-2*(P+1));
IF N=0 AND REF(DIFF,1)<0 and barstatus=2 THEN BEGIN DRAWTEXTREL(5,10,'DIFF上穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLOR00D0D0;END;
IF N=1 AND DIFF<0 and barstatus=2 THEN BEGIN DRAWTEXTREL(5,10,'DIFF上穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLOR00D0D0;END;
IF N=0 AND REF(DIFF,1)>0 and barstatus=2 THEN BEGIN DRAWTEXTREL(5,10,'DIFF下穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLORD0D0D0;END;
IF N=1 AND DIFF>0 and barstatus=2 THEN BEGIN DRAWTEXTREL(5,10,'DIFF下穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLORD0D0D0;END;
拐点价:=((P-1)*EP/(P+1)-(S-1)*ES/(S+1)-DI)*(S+1)*(P+1)/(2*(P+1)-2*(S+1));
IF N=0 AND REF(DIFF,1)<REF(DIFF,2) and barstatus=2 THEN BEGIN DRAWTEXTREL(5,80,'DIFF向上拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLOR00D0D0;END;
IF N=1 AND DIFF<REF(DIFF,1) and barstatus=2 THEN BEGIN DRAWTEXTREL(5,80,'DIFF向上拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLOR00D0D0;END;
IF N=0 AND REF(DIFF,1)>REF(DIFF,2) and barstatus=2 THEN BEGIN DRAWTEXTREL(5,80,'DIFF向下拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLORD0D0D0;END;
IF N=1 AND DIFF>REF(DIFF,1) and barstatus=2 THEN BEGIN DRAWTEXTREL(5,80,'DIFF向下拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLORD0D0D0;END;

MACD修改

资源下载链接   资源大小:unknow

关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - RSS订阅 - TOP
湘ICP备09016573号 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZB.COM ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识