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

【大智慧】《云制MACD顶底背离》指标公式

发布时间:2013/5/5 2:16:29  浏览次数:

偶尔偷闲,把传统的MACD指标做了一下优化,权当送予大家的礼物,祝:各位5.4青年节哈皮!

大智慧,云制MACD,顶底背离,指标公式

 

{云制MACD顶底背离}


VAR1:=BARSLAST(REF(CROSS(EMA(C,13) - EMA(C,34),EMA(EMA(C,13) - EMA(C,34) ,12)),1));

VAR2:=BARSLAST(REF(CROSS(EMA(EMA(C,13) - EMA(C,34) ,12),EMA(C,13) - EMA(C,34) ),1));

VAR3:=LLV(L,VAR2 + 3);

VAR4:=HHV(H,VAR1 +3);

DIFF:EMA(C,13) - EMA(C,34) ;

DEA:EMA(EMA(C,13) - EMA(C,34),12) ;

MACD:1.5 * (EMA(C,13) - EMA(C,34) - EMA(EMA(C,13) - EMA(C,34) ,12) ),LINETHICK0 ;

STICKLINE((MACD > 0),0,MACD,7.5 ,0),COLOR0000CC;

STICKLINE((MACD > 0),0,MACD*0.9,7.5,0),COLOR0000EE;

STICKLINE((MACD > 0),0,MACD*0.8,7.5,0),COLOR0011FF;

STICKLINE((MACD > 0),0,MACD*0.7,7.5,0),COLOR0033FF;

STICKLINE((MACD > 0),0,MACD*0.6,7.5,0),COLOR0055FF;

STICKLINE((MACD > 0),0,MACD*0.5,7.5,0),COLOR0077FF;

STICKLINE((MACD > 0),0,MACD*0.4,7.5,0),COLOR0099FF;

STICKLINE((MACD > 0),0,MACD*0.3,7.5,0),COLOR00BBFF;

STICKLINE((MACD > 0),0,MACD*0.2,7.5,0),COLOR00DDFF;

STICKLINE((MACD > 0),0,MACD*0.1,7.5,0),COLOR00FFFF;

STICKLINE((MACD < 0),0,MACD,7.5,0),COLORCC0033;

STICKLINE((MACD < 0),0,MACD*0.9,7.5,0),COLOREE0033;

STICKLINE((MACD < 0),0,MACD*0.8,7.5,0),COLORFF1133;

STICKLINE((MACD < 0),0,MACD*0.7,7.5,0),COLORFF3333;

STICKLINE((MACD < 0),0,MACD*0.6,7.5,0),COLORFF5533;

STICKLINE((MACD < 0),0,MACD*0.5,7.5,0),COLORFF7733;

STICKLINE((MACD < 0),0,MACD*0.4,7.5,0),COLORFF9933;

STICKLINE((MACD < 0),0,MACD*0.3,7.5,0),COLORFFBB33;

STICKLINE((MACD < 0),0,MACD*0.2,7.5,0),COLORFFDD33;

STICKLINE((MACD < 0),0,MACD*0.1,7.5,0),COLORFFFF33;

 

PARTLINE(EMA(C,13) - EMA(C,34) ,EMA(C,13) - EMA(C,34) >= EMA(EMA(C,13) - EMA(C,34) ,12) ,RGB(255,0,0));

PARTLINE(EMA(C,13) - EMA(C,34), (EMA(C,13) - EMA(C,34) - EMA(EMA(C,13) - EMA(C,34) ,12) ) * 1000/EMA(C,15) > 0 AND (EMA(C,13) - EMA(C,34) - EMA(EMA(C,13) - EMA(C,34) ,12) ) * 1000/EMA(C,15) < 1.85,RGB(0,255,0));

PARTLINE(EMA(C,13) - EMA(C,34) ,EMA(C,13) - EMA(C,34) < EMA(EMA(C,13) - EMA(C,34) ,12) OR EMA(C,13) - EMA(C,34) > EMA(EMA(C,13) - EMA(C,34) ,12) AND REF(EMA(C,13) - EMA(C,34) ,1) < REF(EMA(EMA(C,13) - EMA(C,34) ,12) ,1),RGB(0,0,255));

MACD底背离:REF(VAR3,VAR1 + 1) > VAR3 AND REF(EMA(C,13) - EMA(C,34) ,VAR1 + 1) < EMA(C,13) - EMA(C,34) AND CROSS(EMA(C,13) - EMA(C,34),EMA(EMA(C,13) - EMA(C,34) ,12) ),LINETHICK0,COLORRED;

DRAWTEXT(REF(VAR3,VAR1 + 1) > VAR3 AND REF(EMA(C,13) - EMA(C,34) ,VAR1 + 1) < EMA(C,13) - EMA(C,34) AND CROSS(EMA(C,13) - EMA(C,34) ,EMA(EMA(C,13) - EMA(C,34) ,12) ),EMA(EMA(C,13) - EMA(C,34) ,12)-0.1,'底'),COLOR00FFFF,ALIGN0,LAYER1;

DRAWTEXT(REF(VAR3,VAR1 + 1) > VAR3 AND REF(EMA(C,13) - EMA(C,34) ,VAR1 + 1) < EMA(C,13) - EMA(C,34) AND CROSS(EMA(C,13) - EMA(C,34) ,EMA(EMA(C,13) - EMA(C,34) ,12) ),EMA(EMA(C,13) - EMA(C,34) ,12)-0.3,'背'),COLOR00FFFF,ALIGN0,LAYER1;

MACD顶背离:REF(VAR4,VAR2 + 1) < VAR4 AND REF(EMA(C,13) - EMA(C,34) ,VAR2 + 1) > EMA(C,13) - EMA(C,34) AND CROSS(EMA(EMA(C,13) - EMA(C,34) ,12) ,EMA(C,13) - EMA(C,34) ),LINETHICK0,COLORGREEN;

DRAWTEXT(REF(VAR4,VAR2 + 1) < VAR4 AND REF(EMA(C,13) - EMA(C,34) ,VAR2 + 1) > EMA(C,13) - EMA(C,34) AND CROSS(EMA(EMA(C,13) - EMA(C,34) ,12) ,EMA(C,13) - EMA(C,34) ),EMA(EMA(C,13) - EMA(C,34) ,12)+0.3,'顶'),COLORFFFF00,ALIGN0,LAYER1;

DRAWTEXT(REF(VAR4,VAR2 + 1) < VAR4 AND REF(EMA(C,13) - EMA(C,34) ,VAR2 + 1) > EMA(C,13) - EMA(C,34) AND CROSS(EMA(EMA(C,13) - EMA(C,34) ,12) ,EMA(C,13) - EMA(C,34) ),EMA(EMA(C,13) - EMA(C,34) ,12)+0.1,'背'),COLORFFFF00,ALIGN0,LAYER1;

DRAWICON(CROSS(EMA(C,13) - EMA(C,34) >= EMA(EMA(C,13) - EMA(C,34) ,12),0.5),EMA(EMA(C,13) - EMA(C,34) ,12) ,1),ALIGN0,LAYER1;

DRAWICON(CROSS(EMA(EMA(C,13) - EMA(C,34) ,12) >=EMA(C,13) - EMA(C,34) ,0.5),EMA(EMA(C,13) - EMA(C,34) ,12) ,2),ALIGN0,LAYER1;

 

 


 

 

 

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

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