量化系统趋势线高低点一网打尽很好的看盘系统
diff:=100*(ema(close,12)-ema(close,26)),nodraw;
dea:=ema(diff,9),nodraw;
macd:=(diff-dea)*2,nodraw;
//好公式网www.goodgongshi.com
死叉:=cross(dea,diff);
n1:=barslast(死叉);
n2:=ref(barslast(死叉),n1+1);
n3:=ref(barslast(死叉),n2+n1+2);
cl1:=llv(low,n1+1);
difl1:=llv(diff,n1+1);
cl2:=ref(cl1,n1+1);
difl2:=ref(difl1,n1+1);
cl3:=ref(cl2,n1+1);
difl3:=ref(difl2,n1+1);
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);
mdifl3:=intpart(difl3/pow(10,pdifl3));
mdifb2:=intpart(diff/pow(10,pdifl2));
mdifb3:=intpart(diff/pow(10,pdifl3));
直接底部结构:=(cl1<cl2 ) and (mdifb2>mdifl2) and diff<0 and (macd<0 and ref(macd,1)<0) and mdifb2<=ref(mdifb2,0);
隔峰底部结构:=(cl1<cl3 and cl3<cl2 ) and (mdifb3>mdifl3) and (macd<0 and ref(macd,1)<0) and mdifb3<=ref(mdifb3,0);
bg:=((mdifb2>ref(mdifb2,1))*ref(直接底部结构,2)) or ((mdifb3>ref(mdifb3,2))*ref(隔峰底部结构,2)),nodraw;
p:=cross(diff,dea);
drawtext(filter(bg and p,macd>0),l*0.99,'●底部结构'),colormagenta;
金叉:=cross(diff,dea);
m1:=barslast(金叉);
m2:=ref(barslast(金叉),m1+1);
m3:=ref(barslast(金叉),m2+m1+2);
ch1:=hhv(high,m1+1);
difh1:=hhv(diff,m1+1);
ch2:=ref(ch1,m1+1);
difh2:=ref(difh1,m1+1);
ch3:=ref(ch2,m1+1);
difh3:=ref(difh2,m1+1);
pdifh2:=if(difh2>0,intpart(log(difh2))-1,intpart(log(-difh2))-1);
mdifh2:=intpart(difh2/pow(10,pdifh2));
pdifh3:=if(difh3>0,intpart(log(difh3))-1,intpart(log(-difh3))-1);
mdifh3:=intpart(difh3/pow(10,pdifh3));
mdift2:=intpart(diff/pow(10,pdifh2));
mdift3:=intpart(diff/pow(10,pdifh3));
直接顶部结构:=(ch1>ch2 ) and (mdift2<mdifh2) and diff>0 and (macd>0 and ref(macd,1)>0) and mdift2>=ref(mdift2,0);
隔峰顶部结构:=(ch1>ch3 and ch3>ch2 ) and (mdift3<mdifh3) and (macd>0 and ref(macd,1)>0) and mdift3>=ref(mdift3,0);
tg:=((mdift2<ref(mdift2,1))*ref(直接顶部结构,2)) or ((mdift3<ref(mdift3,2))*ref(隔峰顶部结构,2)),nodraw;
q:=cross(dea,diff);
drawtext(filter(tg and q,macd<0),h*1.02,'●顶部结构'),colorgreen;
w1:=filter(if(hhvbars(high,13),0,1),13);
drawtext(w1 and strfind(periodname,'日线'),h*1.01,'时间'),coloryellow;
w2:=filter(if(llvbars(low,13),0,1),13);
drawtext(w2 and strfind(periodname,'日线'),h*1.01,'时间'),coloryellow;
a1:=c>ref(c,4);
nt:=barslastcount(a1);
tj11:=nt=9;
tj13:=islastbar and between(nt,5,8);
ay:=(backset(tj11>0,9) or backset(tj13>0,nt))*nt;
drawtext(nt=9,h*1.007,'▲高点'),colorgreen;
k1:=ref(c,0)>ref(c,13);
k2:=ref(nt=9,13);
drawtext(k1 and k2 and strfind(periodname,'日线'),h*1.007,'■顶'),colorred;
b1:=c<ref(c,4);
nt0:=barslastcount(b1);
tj21:=nt0=9 ;
tj23:=islastbar and between(nt0,5,8);
ay1:=(backset(tj21>0,9) or backset(tj23>0,nt0))*nt0;
drawtext(nt0=9,l*0.994,'▲低点'),colorred;
t1:=ref(c,0)<ref(c,13);
t2:=ref(nt0=9,13);
drawtext(t1 and t2 and strfind(periodname,'日线'),l*0.994,'■底'),colorgreen;
a1a:=ema(close, 9);
a1b:=((a1a - ema(close, 5)) < 0);
a1c:=((a1a - ema(close, 5)) > 0);
a1d:=barslast(a1b);
a1e:=barslast(a1c);
a1f:=if((a1e > 0),(close - ref(close, 1)) / ref(close, 1) * 100,0);
a20:=sum(a1f,0);
a21:=if((a1d > 0),(0 - 2),0);
a22:=if((a1e > 0),sum((close - ref(close, 1)) / ref(close, 1) * 100,a1e),0);
a23:=a22 / a1e;
a25:=ema(ema(ema(close, 3), 3), 3);
上升通道:((a25 - ref(a25, 1)) + a25),colorred;
反转通道:ma(上升通道, 15),colorgreen;
drawtext(cross(c,反转通道) and strfind(periodname,"日线"),l*0.994,'↑多头'),colorlired;
drawtext(cross(反转通道,c) and strfind(periodname,"日线"),h*1.01,'↓空头'),colorblue;
上一指标公式:搏杀生命线经典公式下载 同花顺生命线指标
下一指标公式:尾盘抄底公式下载 同花顺抄底
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文MOSS公式下载 同花顺MOSS仅供学习研究。