dif:ema(close,12)-ema(close,26),nodraw;
dea:ema(dif,9),nodraw;
macd:(dif-dea)*2,colorstick,colorred;
{以下是copy的,来源于理想论坛}
es:=ref(ema(c,26),1);ep:=ref(ema(c,12),1);
di:=ref(dif,1);
dif穿零价:((12+1)*(26-1)*es-(26+1)*(12-1)*ep)/(2*(26+1)-2*(12+1)),nodraw,colorwhite;
dif拐点价:((12-1)*ep/(12+1)-(26-1)*es/(26+1)-di)*(26+1)*(12+1)/(2*(12+1)-2*(26+1)),coloryellow,nodraw;
{以下是自己的}
tj1:=dea<0 and cross(dif,dea);{零下金叉}
tj2:=barslast(cross(0,dif));{下跌起点到现在的周期数}
tj3:=dea<0 and count(tj1,tj2+1)>1;{从下跌起点算起,零下金叉两次以上}
tj4:=dea<0 and macd>0 and ref(macd,1)>0 and ref(macd,1)<ref(macd,2) and macd>ref(macd,1);{零下且macd为正时,dif,dea收敛后发散}
tj5:=barslast(tj1);{上一次零下金叉到现在的周期数}
tj6:=dea<0 and tj3 and count(tj4,tj5+1)>0,nodraw;{零下两次金叉后发生至少一次收敛后发散}
tj7:=dea<0 and count(tj6,tj2)>0,nodraw;{满足条件6的周期}
tj8:=dea<0 and count(tj1,tj2+1)>2;{从下跌起点算起,零下金叉三次以上}
tj9:=dea<0 and count(tj8,tj2)>0,nodraw;{满足条件8的周期}
tj10:=tj7 and dif>0 and dif>ref(dif,1) and dea<0;{条件6信号加强}
tj11:=tj9 and dif>0 and dif>ref(dif,1) and dea<0;{条件8信号加强}
tj12:=dif>0 and dea>0 and ref(macd,1) and ref(macd,2)<0 and macd>ref(macd,1) and ref(macd,1)<ref(macd,2);{零上且dif,dea反向收敛}
stj1:=dif>0 and macd>0 and ref(macd,1)>0 and ref(macd,1)>ref(macd,2) and macd<ref(macd,1);{零上macd为正时,dif,dea发生收敛}
stj2:=barslast(cross(dif,0)),nodraw;{上涨起点到现在的周期数}
stj3:=barslast(cross(dif,dea));{上一次金叉以来到现在的周期数}
stj4:=dif>0 and count(stj1,stj2)>1 and count(stj1,stj3)>1 and stj1;
{从上涨起点算起,发生零上收敛两次以上}
stj5:=dif>0 and count(stj1,stj2)>2 and count(stj1,stj3)>2 and stj1;
{从上涨起点算起,发生零上收敛三次以上}
stj6:=dif>0 and count(stj1,stj2)>3 and count(stj1,stj3)>3 and stj1;
{从上涨起点算起,发生零上收敛四次以上}
stj7:=dif>0 and count(stj1,stj2)<2 and cross(dea,dif);
{从上涨起点算起,零上收敛一次即出现死叉}
stj8:=count(cross(dif,dea),stj2)>0 and stj1;{零上金叉后出现零上收敛}
stj9:=dif>0 and ref(cross(dif,dea),1) and cross(dea,dif);{零上金叉后随即死叉}
stj10:=count(dif>0 and (stj4 or stj7 or stj8 or stj9),stj2);
stj11:=dif>0 and macd<0 and ref(macd,2)<0 and macd<ref(macd,1) and ref(macd,1)>ref(macd,2);{零上二次向下发散}
减仓提示:stj10,nodraw,colorgreen;
清仓提示:stj10>4,nodraw,colormagenta;
stickline(dea<0 and macd<0,0,macd,2,0),colorblue;
stickline(dea<0 and macd>=0,0,macd,1,-1),colorblue;
stickline(dea<0 and macd>=0 and macd<ref(macd,1),0,macd,1,1),colorblue;
stickline(dea>=0 and macd>0,0,macd,0,1),colorlired;
stickline(dea>=0 and macd>0 and macd<ref(macd,1),0,macd,0,-1),colorlired;
stickline(dea>=0 and macd<0 and macd>ref(macd,1),0,macd,0,-1),colorlired;
stickline(tj7 and macd>0,0,macd,2,1),coloryellow;
stickline(tj7 and macd>0 and macd<ref(macd,1),0,macd,2,-1),coloryellow;
stickline(tj7 and macd<0,0,macd,2,0),colorgreen;
stickline(tj7 and macd<0 and macd>ref(macd,1),0,macd,2,1),colorgreen;
stickline(tj9 and macd>0,0,macd,2,0),coloryellow;
stickline(tj9 and macd>0 and macd<ref(macd,1),0,macd,2,1),coloryellow;
stickline(tj9 and macd<0,0,macd,2,1),colorgreen;
stickline(tj9 and macd<0 and macd>ref(macd,1),0,macd,2,-1),colorgreen;
stickline(tj10,0,macd,2,1),colorred;
stickline(tj10 and macd<ref(macd,1),0,macd,2,-1),colorred;
stickline(tj11,0,macd,2,0),colorred;
stickline(tj11 and macd<ref(macd,1),0,macd,2,1),colorred;
stickline(tj12,0,dif,0,-1),colorred;
stickline(stj4,0,macd,2,-1),colorgreen;
drawicon(stj4,dif*1.03,2);
stickline(stj5,0,macd,2,1),colorgreen;
drawicon(stj5,dif*1.03,2);
stickline(stj6,0,macd,2,0),colorgreen;
drawicon(stj6,dif*1.03,2);
stickline(stj7,0,macd,2,0),colorgreen;
drawicon(stj7,dea*1.03,2);
stickline(stj8,0,macd,2,0),colorblue;
drawicon(stj8,dif*1.03,2);
stickline(stj9,0,macd,2,0),colorblue;
drawicon(stj9,dea*1.03,2);
drawtext(stj10>4 and (stj4 or stj7 or stj8 or stj9),dif*1.1,'逃'),colormagenta;
stickline(stj11,0,dif,0,-1),colorblue;
{以下是copy的,来源于理想论坛}
j1:="macd.dif"(12,26,9);j2:="macd.dea"(12,26,9);
j3:="kdj.k"(15,6,3);j4:="kdj.d"(15,6,3);
j5:="rsi.rsi1"(6,12,24);j6:="rsi.rsi2"(6,12,24);
a1:=barslast(ref(cross(j1,j2),1));
b1:=ref(c,a1+1)>c and ref(j1,a1+1)<j1 and cross(j1,j2);
a2:=barslast(ref(cross(j3,j4),1));
b2:=ref(c,a2+1)>c and ref(j3,a2+1)<j3 and cross(j3,j4);
a3:=barslast(ref(cross(j5,j6),1));
b3:=ref(c,a3+1)>c and ref(j5,a3+1)<j5 and cross(j5,j6);
c1:=barslast(ref(cross(j2,j1),1));
d1:=ref(c,c1+1)<c and ref(j1,c1+1)>j1 and cross(j2,j1);
c2:=barslast(ref(cross(j4,j3),1));
d2:=ref(c,c2+1)<c and ref(j3,c2+1)>j3 and cross(j4,j3);
c3:=barslast(ref(cross(j6,j5),1));
d3:=ref(c,c3+1)<c and ref(j5,c3+1)>j5 and cross(j6,j5);
macd底背离:=filter(b1>0,5);
drawtext(macd底背离,ref(j1,a1+1),'m底'),coloryellow;
kdj底背离:=filter(b2>0,5);
drawtext(kdj底背离,ref(j1,a1+2),'k底'),colorwhite;
rsi底背离:=filter(b3>0,5);
drawtext(rsi底背离,ref(j1,a1+3),'r底'),colorffcc66;
macd顶背离:=filter(d1>0,5);
drawtext(macd顶背离,ref(j1,d1+1),'m顶'),color0066ff;
kdj顶背离:=filter(d2>0,5);
drawtext(kdj顶背离,ref(j1,d1+2),'k顶'),color0000ff;
rsi顶背离:=filter(d3>0,5);
drawtext(rsi顶背离,ref(j1,d1+3),'r顶'),colorff00ff;
dif,colordddd00;dea,coloryellow;if(dif>=ref(dif,1),dif,drawnull),colorff00ff;
上一指标公式:买卖筹码峰+boll主图TDX指标下载 通达信源码买卖
下一指标公式:东家分时看盘系列1买卖决策TDX指标下载 通达信看盘决策
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文自用备份-MACD优化TDX主副图指标下载 通达信备份优化仅供学习研究。