股票论坛

 找回密码
 免费注册
搜索
热搜: 活动 交友 discuz
查看: 2398|回复: 0
打印 上一主题 下一主题

macd变色龙

[复制链接]

爵★★★

Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21

听众
2
跳转到指定楼层
楼主
发表于 2017-2-16 17:14 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
LONG (2, 100, 26); SHORT (1, 40, 12); M (1, 60, 9);

DIF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIF,M);
MACD : 2*(DIF-DEA),COLORSTICK;
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,6,0),colorRED;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,6,0),colorYELLOW;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,6,0),colorGREEN;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,6,0),colorBLUE;


A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
底背离:REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA),,LINETHICK0;
低位金叉:CROSS(DIF,DEA) AND DIF<-0.1,linethick0;
二次金叉:CROSS(DIF,DEA) AND DEA<0,COLORRED,LINETHICK0;
双金叉:低位金叉 AND 二次金叉,ColorYellow,LINETHICK0;
双金叉标志:=IF(低位金叉 AND 二次金叉,1 ,0 );
三全项: 双金叉标志=1 AND 底背离,ColorYellow,LINETHICK0;
三全项标志:=IF(双金叉标志=1 AND 底背离,1 ,0 );

STICKLINE(低位金叉,0,0.08,6,0),COLORFF00FF;
DRAWTEXT(低位金叉 AND 双金叉标志=0,MACD,'低位金叉',macd-10),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));

STICKLINE(二次金叉,0,0.06,6,0),COLORFFCC00;
DRAWICON(二次金叉,DEA*0.9,1);
DRAWTEXT(二次金叉 AND 双金叉标志=0,MACD,'二次金叉',macd-25),COLORYELLOW;

DRAWTEXT(双金叉 AND 三全项标志=0,MACD,'双金叉',macd-25),COLORYELLOW;

STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
DRAWTEXT(底背离,MACD,'底背离',20),COLORFF00FF;

DRAWTEXT(三全项标志=1,MACD,'三全项',macd-40),COLOR0000FF,LINETHICK2;

DRAWTEXT(顶背离,REF(DEA,A2)*1.18,' 顶背离'),colorgreen;


您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|站点首页|手机版|小黑屋|帮助中心|桂ICP备14001964号

GMT+8, 2024-12-5 03:47 , Processed in 0.145115 second(s), 21 queries .

Powered by Discuz! X3.2

© 2004-2014 早晨网股票论坛欢迎您!..

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