黑马定量拉升结构源码下载:
n:=7;
m:=9;
short:=12;
long:=26;
dif:100*(ema(close,12)-ema(close,26));
dea:ema(dif,9);
diff:ema(close,short)-ema(close,long),colorwhite;
dea2: ema(diff,m),coloryellow;
macd:(dif-dea)*2,colorstick;
macd2:=2*(diff-dea2);
死叉:=cross(dea,dif);
n1:=barslast(死叉),nodraw;
stickline(macd2>0,0,macd2,1,0),colorred;
stickline(macd2<0,0,macd2,1,0),colorgreen;
n2:=ref(barslast(死叉),n1+1),nodraw;
n3:=ref(barslast(死叉),n2+n1+2),nodraw;
vargu:=cross(diff,dea2);
cl1:=llv(c,n1+1),nodraw;
difl1:=llv(dif,n1+1),nodraw;
aa:=count(vargu,barslast(dea2>=0));
a1:=barslast(ref(vargu,1));
cl2:=ref(cl1,n1+1),nodraw;
difl2:=ref(difl1,n1+1),nodraw;
cl3:=ref(cl2,n1+1),nodraw;
二次金叉:=cross(diff,dea2) and dea2<0 and aa>=2 and dea2<0 and a1>=5;
drawtext(二次金叉,0.2,''+aa+'次金叉'),coloryellow;
difl3:=ref(difl2,n1+1),nodraw;
pdifl2:=if(difl2>0,intpart(log(difl2))-1,intpart(log(-difl2))-1);
mdifl2:=intpart(difl2/pow(10,pdifl2));
pdifl3:=if(difl3>0,intpart(log(difl3))-1,intpart(log(-difl3))-1);
底背离:=min(ref(close,a1+1),ref(close,a1+2),ref(close,a1+3),
ref(close,a1+4))>llv(close,3) and llv(diff,3)> min(ref(diff,
a1+1),ref(diff,a1+2),ref(diff,a1+3),ref(diff,a1+4)) and vargu and diff<0;
a3:=count(底背离,barslast(dea2>=0));
stickline(底背离,0,hhv(macd2,500),6,0),colorred;
mdifl3:=intpart(difl3/pow(10,pdifl3));
mdifb2:=intpart(dif/pow(10,pdifl2));
mdifb3:=intpart(dif/pow(10,pdifl3));
drawline(a1=0, min(ref(diff,a1+1), ref(diff,a1+2),
ref(diff,a1+3),ref(diff,a1+4)),底背离,llv(diff,3),0),colorred;
直接底背离:=(cl1<cl2 ) and (mdifb2>mdifl2) and
(macd<0 and ref(macd,1)<0) and mdifb2<=ref(mdifb2,1);
隔峰底背离:=(cl1<cl3 and cl3<cl2 ) and (mdifb3>mdifl3)
and (macd<0 and ref(macd,1)<0) and mdifb3<=ref(mdifb3,1);
b:直接底背离 or 隔峰底背离,nodraw;//www.goodgongshi.com
a2:=barslast(ref(cross(dea2,diff),1));
bg:((mdifb2>ref(mdifb2,1))*ref(直接底背离,1)) or
((mdifb3>ref(mdifb3,1))*ref(隔峰底背离,1)),nodraw;
底背离消失:=(ref(直接底背离,1) and difl1<=difl2 ) or
(ref(隔峰底背离,1) and difl1<=difl3);
顶背离:=ref(close,a2+1)<close and ref(diff,
a2+1)>diff and cross(dea2,diff);
stickline(b or bg,dif,dea,8,0),colorred;
wwwchnmoneycom:=close>ma(close,20)and close>ma(close,5);
drawtext(filter(b,macd>0,1),(dif+macd),'钝化'),colorred;
drawtext(filter(bg,macd>0,1),dif*1.1,'结构形成'),colormagenta;
drawline(a2=0,dea2,顶背离,dea2,0),colorgreen;
建仓:if(底背离,a3*hhv(macd2,500),0),colorred;
drawtext(filter(底背离消失,b,1),(dif+macd),'消失'),coloryellow;
stickline(b or bg,dif,dea,5,0),colorred;
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文黑马定量拉升结构下载仅供学习研究。