diff:ema(c,short)-ema(c,long),colorwhite;
dea:ema(diff,8),colorffaa00;
//if(diff>dea,diff,drawnull),colorred,linethick2;
//diff:=if(diff>dea,diff,diff),color0000ff,linethick1;
//diff:=if(diff<=dea,diff,diff),color00ff00,linethick1;
zero:0,colorred;
macd:=2*(diff-dea);
diff上穿0轴:cross(diff,0),nodraw;
stickline(macd>=0,macd,0,2,1),color0000ff;
stickline(macd<0,macd,0,2,1),colorgreen;
stickline(macd<ref(macd,1)and macd>0,0,macd,3,0 ),color00aaff;
stickline(diff上穿0轴,macd,0,3,2),coloryellow;//colorf00ff0;
drawicon(diff上穿0轴,0,'buy') ;
drawtext(diff上穿0轴,macd*2.5,'进'),colorcyan;
x1:=if(diff<0,diff,0),color0000ff,linethick2;
x2:=if(diff<0,0,diff),colormagenta,linethick1;
x3:=if(diff<dea,diff,dea),color00ff00,linethick1;
x4:=if(diff>dea,dea,dea),linethick1,colorffbb11;
macd金叉:cross(diff,dea),nodraw;
低位金叉:cross(diff,dea) and diff<-0.01,nodraw;
非低位金叉:macd金叉 and 低位金叉<1,nodraw;
stickline(低位金叉,dea*0.86,dea*0.66,6,0),coloryellow;
drawtext(低位金叉,dea*1.5,' 低金'),coloryellow;
//{www.gupang.com 好公式网_同花顺股票指标公式}
jccount:=count(cross(diff,dea),barslast(dea>=0));
二次金叉:=cross(diff,dea) and dea<0 and count(jccount=2,21)=1;
stickline(二次金叉,dea*1.3,dea*0.76,6,0),colorff00ff;
drawicon(二次金叉,dea*1.1,'buy') ;
drawtext(二次金叉,dea*0.96,' -二金'),colorff00ff;
a1:=barslast(ref(cross(diff,dea),1));
底背离:=ref(close,a1+1)>close and diff>ref(diff,a1+1) and cross(diff,dea);
stickline(底背离,dea*1.09,dea*0.86,6,0),color00ff00;
drawline(a1=0,dea,底背离,dea,0),colorred,linethick1;
drawtext(底背离,dea*2,' 底背离'),color6600ff;
a2:=barslast(ref(cross(dea,diff),1));
顶背离:=ref(close,a2+1)<close and ref(diff,a2+1)>diff and cross(dea,diff);
drawline(a2=0,dea,顶背离,dea,0),colorgreen,linethick1;
drawtext(顶背离,dea*1.2,' 顶背离'),color00ff00;
// 0轴上方强金叉
aa:=cross(diff,dea) and dea>0;
t:=barslast(cross(dea,diff));
cc:=ref(barslast(cross(diff,0)),t+1)<days and count(diff>=dea,t)=1;
macd强金叉:aa and cc,nodraw;
drawtext(macd强金叉,dea*0.5,'-强金'),coloryellow;
drawicon(macd强金叉,dea,'buy') ;
macd死叉:cross(dea,diff),nodraw;
drawicon(macd死叉,dea*1.1,'sell') ;
macd强金叉前溯:=count(macd强金叉,pastdays);
macd强金叉期:macd强金叉前溯+macd强金叉,nodraw;
macd金叉期:count(macd金叉,pastdays),nodraw;
macd死叉期:count(macd死叉,pastdays),nodraw;
macd低位金叉前溯:=count(低位金叉,pastdays),nodraw;
macd低位金叉期:macd低位金叉期+低位金叉,nodraw;
macd非低位金叉前溯:=count(非低位金叉,pastdays),nodraw;
macd非低位金叉期:macd非低位金叉前溯+非低位金叉,nodraw;
drawtext(macd金叉 and (1-低位金叉) and (1-二次金叉) and (1-macd强金叉),dea*1.1,' 金叉'),colormagenta;
diffoverzero:cross(diff,0),nodraw;
diff过零轴期:count(diffoverzero,pastdays),nodraw;
macd金叉或过零轴期:macd金叉期+diff过零轴期,nodraw;
上一指标公式:跟庄高手详解 同花顺高手
下一指标公式:买卖调量低位出现大红柱可积极关注详解 同花顺大红买卖
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文MACD顶背离+金叉死叉详解 同花顺MACD金叉死叉仅供学习研究。