long:= 26; m:=9; short:=12;
diff1:=ema(close,short) - ema(close,long);
dea1:=ema(diff1,m);
macd:=2*(diff1-dea1);
diff:ema(close,short) - ema(close,long),colorff00ff,linethick2;
dea:ema(diff1,m),colorwhite,linethick2;
ah:hhv(diff1,55),color6600ff,linethick2;
if(ah,ah,drawnull),colorwhite,pointdot,linethick2;
drawicon(ref(ah=diff1,1) and diff<ref(diff1,1),ah,8);
al:llv(diff1,55),color248a24,linethick2;
if(al,al,drawnull),colorwhite,pointdot,linethick2;
drawicon( ref(al=diff1,1) and diff>ref(diff1,1),al,7);
{●60零上金叉:if(cross(diff,dea) and diff>0,0.3,0),color6600ff,pointdot;
stickline(●60零上金叉,diff,ah,4,0),color6600ff;}
■零下金叉:if(cross(diff,dea) and diff<-0.001,0.3,0),colorwhite,pointdot;
stickline(■零下金叉,0.1,0.15,6,0),colorwhite;
jccount:=count(cross(diff,dea),barslast(dea>=0));
■二次金叉:if(cross(diff,dea) and dea<0 and count(jccount=2,21)=1,0.2,0),color3c86cc,pointdot;
stickline(■二次金叉,0.15,0.2,6,0),color3c86cc;
a3:=cross(diff,dea) and dea<0;
■零下二次金叉:if(filter(count(a3,21)=2,10) and dea<0,0.05,0),colorf58f98,pointdot;
stickline(■零下二次金叉,0.25,0.3,6,0),colorf58f98;
a1:=barslast(ref(cross(diff,dea),1));
■底背离:if(ref(close,a1+1)>close and diff>ref(diff,a1+1) and cross(diff,dea),0.1,0),colorffff00;
底背离1:stickline(ref(close,a1+1)>close and diff>ref(diff,a1+1) and cross(diff,dea),0,al,4,0),color00ff00;
stickline(■底背离,0.2,0.25,6,0),colorffff00;
{drawline(a1=0,dea,■底背离,dea,0),coloryellow};
{a2:=barslast(ref(cross(dea,diff),1));
顶背离:stickline(ref(close,a2+1)<close and ref(diff,a2+1)>diff and cross(dea,diff),0,diff,4,0),colorblack;
drawline(a2=0,dea,顶背离,dea,0),colorgreen;}
dd:=c=hhv(c,100);
ee:=dea1< ref(dea1,1) and ref(dea1< ref(dea1,1),1)=1;
cc:=c> ref(c,1) and ref(c> ref(c,1),1)=1;
上升背离:(cc and ee)*ah,stick,linethick2,colorff00ff;
顶背离:(dd and ee and dea1< hhv(dea1,100))*ah,stick,linethick2,coloryellow;
drawtext(顶背离,dea1/2,'顶背离'),coloryellow;
ff:=c=llv(c,100);
gg:= dea1> ref(dea1,1) and ref(dea1> ref(dea1,1),1)=1;
ll:=c< ref(c,1) and ref(c< ref(c,1),1)=1;
下降背离:(ll and gg)*al,stick,linethick2,colorwhite;
底背离:(ff and gg and dea1> llv(dea1,100))*al,stick,linethick2,color6600ff;
drawtext(底背离,dea1/2,'底背离'),color6600ff;
if(diff<0,diff,0),colorff00ff,linethick2;
if(diff<0,0,diff),coloryellow,linethick2;
if(diff<dea,diff,dea),colorffff00,linethick2;
if(diff>dea,dea,dea),colorwhite,linethick2;
stickline(macd<ref(macd,1)and macd>0,0,macd,4,0 ),color00cc00;
stickline(macd<ref(macd,1)and macd>0,0,macd,3,0 ),color00dd00;
stickline(macd<ref(macd,1)and macd>0,0,macd,2,0 ),color00ee00;
stickline(macd<ref(macd,1)and macd>0,0,macd,1,0 ),color00ff00;
stickline(macd>=ref(macd,1)and macd>0,0,macd,3,0 ),color0000dd;
stickline(macd>=ref(macd,1)and macd>0,0,macd,2,0 ),color0000ee;
stickline(macd>=ref(macd,1)and macd>0,0,macd,1,0 ),color0000ff;
stickline(macd>ref(macd,1)and macd<0,0,macd,3,0 ),color33dfdd;
stickline(macd>ref(macd,1)and macd<0,0,macd,2,0 ),color33efdd;
stickline(macd>ref(macd,1)and macd<0,0,macd,1,0 ),color33ffdd;
stickline(macd<=ref(macd,1)and macd<0,0,macd,3,0 ),colorffaa00;
stickline(macd<=ref(macd,1)and macd<0,0,macd,2,0 ),colorffbb00;
stickline(macd<=ref(macd,1)and macd<0,0,macd,1,0 ),colorffcc00;
var1:=hhv(dea,53);
var2:=llv(dea,30);
var3:=dea-(diff-dea);
up:if(diff>var1 and dea=var1,max(llv(var1,10),var3),var1),colorbb9a00,linethick2;
dn:if(diff<var2 and dea=var2,min(hhv(var2,10),var3),var2),coloraa00bb,linethick2;
美人开眼:=cross(diff ,dea ) and cross( diff,dn ) and dn<0;
美人开眼a:美人开眼*al,stick,linethick4,color8080ff;
drawtext(美人开眼,dn,'美人开眼'),color8080ff,linethick2;
美人收眼:=cross(dea ,diff ) and cross( up,diff ) and diff<up;
美人收眼a:美人收眼*ah,stick,linethick4,color9ca010;
drawtext(美人收眼,dn,'美人收眼'),color9ca010,linethick2;
{用于大智慧时删除以下源码}
al,color248a24,linethick2;
drawband(ma(diff,2),rgb(0,58,224),diff,rgb(255,0,46));
diff,colorff00ff,linethick1;
dea,colorwhite,linethick3;
上一指标公式:短线波段副图指标详解 通达信源码贴图
下一指标公式:趋势操作主图及三付图指标详解 通达信公式源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文[L-2]玩股美人眼MACD-清晰的金叉背离指标详解 通达信通达信仅供学习研究。