设为首页收藏本站

步步汇盈服务平台

 找回密码
 手机注册
搜索
查看: 1592|回复: 0
打印 上一主题 下一主题

具有实用价值的经AHFYXL1 改良优化的MACD指标

[复制链接]
跳转到指定楼层
楼主
发表于 2016-4-6 11:22:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式


{★MACD★}
input: N(1.5,1,10),M(3,1,20),P(64,1,100);
DRAWGBK(1, COLORRGB(100,100,100),COLORRGB(50,50,50),1);
DIFF:=EMA((EMA(CLOSE,N*12)-EMA(CLOSE,N*26))/EMA(CLOSE,N*26)*1000,M);
DEA:=EMA(DIFF,N*9),COLOR000088;
MACD:=2*(DIFF-DEA);
MACDx:=MACD;
MACDo:=EMA(MACD,5),COLORFF77FF;
DIFFO:=EMA(DEA,P)*1.8;
B:=MACD-REF(MACD,1);
STICKLINE(MACD>0 AND B>0,0,MACD,0,1),Color0000CD;//红
STICKLINE(MACD>0 AND B<0,0,MACD,0,0),Color0000CD;//红
STICKLINE(MACD<0 AND B>0,0,MACD,0,1),COLORCYAN;//
STICKLINE(MACD<0 AND B<0,0,MACD,0,0),COLORCYAN;//
FILLRGN(DIFF>DEA,DIFF,DEA),Color0089FF;
FILLRGN(DIFF<DEA,DIFF,DEA),COLORBLUE;
PARTLINE(DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),DIFF),Color00C500,LINETHICK4;
PARTLINE(DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),DIFF),COLORYELLOW,LINETHICK4;
PARTLINE(DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),DIFF),COLORGRAY;//
PARTLINE(DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),DIFF),COLORBLUE;//
//PARTLINE(DIFFO>=REF(DIFFO,1),DIFFO);PARTLINE(DIFFO<REF(DIFFO,1),DIFFO);
DRAWTEXT(BARPOS=SYSPARAM(2),1,'操作:蓝转绿试买;见橙加仓;维持橙持股'),align4,Color008987;
DRAWTEXT(BARPOS=SYSPARAM(2),1,'  \n      橙转黄减仓;  蓝色空仓'),align4,Color008987;

//
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 手机注册

本版积分规则

QQ|小黑屋|手机版|Archiver|步步汇盈 ( 冀ICP备13000772   

GMT+8, 2024-11-23 20:47 , Processed in 0.131071 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc. 技术支持 by 巅峰设计.

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