步步汇盈

标题: 具有实用价值的经AHFYXL1 改良优化的MACD指标 [打印本页]

作者: 醉心    时间: 2016-4-6 11:22
标题: 具有实用价值的经AHFYXL1 改良优化的MACD指标


{★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;

//




欢迎光临 步步汇盈 (http://bbs.58851.com/) Powered by Discuz! X3.2