云氏线性回归主图源码下载:
把自己组合的指标奉献给有需要的人,以前源码下载:过的线性回归指标,我今天组合了一下,改成了两个不同周期的,感觉看趋势很不错,供大家参考和指教
{金谷交易系统}
em01:=ema(c,10);
em:=ema(c,21);
up:=ema(em,13);
down:=ema(em,17);
midd:(up+down)/2,pointdot;
stickline(midd>ref(midd,1),up,down,1,0),colormagenta;
stickline(midd<ref(midd,1),up,down,1,0),colorgreen;
stickline(midd=ref(midd,1),up,down,1,0),colorgray;
止盈线:ema(ema(c,10),10),coloryellow,linethick1;
空止盈:=止盈线>ref(止盈线,1);
if(空止盈-1,止盈线,drawnull),colorcyan,linethick1;
drawicon(ref(midd,1)<=ref(midd,2) and midd>ref(midd,1),down,7);
drawicon(ref(midd,1)>=ref(midd,2) and midd<ref(midd,1),up,8);
{线性回归画线}
ur:=15;lr:=15;{可调}
tc1:=if(c=hhv(c,5*ur),c,drawnull);
tc2:=const(barslast(tc1=c))+1;
bc1:=if(l=llv(l,5*lr),l,drawnull);
bc2:=const(barslast(bc1=l))+1;
nod:=(if(tc2>bc2,tc2,bc2)-if(tc2>bc2,bc2,tc2));
lr1:=forcast(c,nod+1);
np:=if(currbarscount<=max(bc2,tc2),const(if(min(tc2,bc2)=1,lr1,ref(lr1,min(tc2,bc2)-1))),drawnull),pointdot,color93bda8;
lr2:=slope(c,nod+1);{好公式网-最好的股票公式网站 www.goodgongshi.com}
lr3:=const(if(min(tc2,bc2)=1,lr2,ref(lr2,min(tc2,bc2)-1)));
fp:=np-lr3*(nod),pointdot,color93bda8;
ad:=abs(np-fp);
dbl:=barslast(bc1!=drawnull)+1;
dbh:=barslast(tc1!=drawnull)+1;
bsp:=if(bc2>tc2,dbl,dbh)-1;
lrl:=if(np>fp,fp+ad/nod*bsp,fp-ad/nod*bsp);
at1:=if(between(currbarscount,bc2,tc2) and c>lrl,c,lrl);
at2:=hhv(at1-lrl,max(bc2,tc2));
at3:=const(barslast(at1-lrl=at2));
at5:=const(if(at3=0,at1-lrl,ref(at1-lrl,at3)));
atl:=lrl+at5;
ut1:=if(between(currbarscount,bc2,tc2) and l<lrl,l,lrl);
ut2:=hhv(lrl-ut1,max(bc2,tc2));
ut3:=const(barslast(lrl-ut1=ut2));
ut5:=const(if(ut3=0,lrl-ut1,ref(lrl-ut1,ut3)));
utl:=lrl-ut5;
rh:=if(currbarscount>=min(bc2,tc2)-10,atl,const(ref(atl,min(bc2,tc2)-11)));
rl:=if(currbarscount>=min(bc2,tc2)-10,utl,const(ref(utl,min(bc2,tc2)-11)));
中轨:=if(np>fp,if(lrl<=rh,lrl,drawnull),if(lrl>=rl,lrl,drawnull)),colorlicyan;
上轨12:if(np>fp,if(atl<=rh,atl,drawnull),if(atl>=rl,atl,drawnull)),colorlicyan;
下轨12:if(np>fp,if(utl<=rh,utl,drawnull),if(utl>=rl,utl,drawnull)),colorlicyan;
if(np>fp,if(lrl-utl<atl-lrl,lrl*2-utl,if(atl-lrl<lrl-utl,lrl-(atl-lrl),drawnull)),if(lrl-utl<atl-lrl,lrl*2-utl,if(atl-lrl<lrl-utl,lrl-(atl-lrl),drawnull))),dotline,colorlicyan;
ura:=5;lra:=5;{可调}
tc1a:=if(c=hhv(c,5*ura),c,drawnull);
tc2a:=const(barslast(tc1a=c))+1;
bc1a:=if(l=llv(l,5*lra),l,drawnull);
bc2a:=const(barslast(bc1a=l))+1;
noda:=(if(tc2a>bc2a,tc2a,bc2a)-if(tc2a>bc2a,bc2a,tc2a));
lr1a:=forcast(c,noda+1);
npa:=if(currbarscount<=max(bc2a,tc2a),const(if(min(tc2a,bc2a)=1,lr1a,ref(lr1a,min(tc2a,bc2a)-1))),drawnull),pointdot,color93bda8;
lr2a:=slope(c,noda+1);
lr3a:=const(if(min(tc2a,bc2a)=1,lr2a,ref(lr2a,min(tc2a,bc2a)-1)));
fpa:=npa-lr3a*(noda),pointdot,color93bda8;
ada:=abs(npa-fpa);
dbla:=barslast(bc1a!=drawnull)+1;
dbha:=barslast(tc1a!=drawnull)+1;
bspa:=if(bc2a>tc2a,dbla,dbha)-1;
lrla:=if(npa>fpa,fpa+ada/noda*bspa,fpa-ada/noda*bspa);
at1a:=if(between(currbarscount,bc2a,tc2a) and c>lrla,c,lrla);
at2a:=hhv(at1a-lrla,max(bc2a,tc2a));
at3a:=const(barslast(at1a-lrla=at2a));
at5a:=const(if(at3a=0,at1a-lrla,ref(at1a-lrla,at3a)));
atla:=lrla+at5a;
ut1a:=if(between(currbarscount,bc2a,tc2a) and l<lrla,l,lrla);
ut2a:=hhv(lrla-ut1a,max(bc2a,tc2a));
ut3a:=const(barslast(lrla-ut1a=ut2a));
ut5a:=const(if(ut3a=0,lrla-ut1a,ref(lrla-ut1a,ut3a)));
utla:=lrla-ut5a;
rha:=if(currbarscount>=min(bc2a,tc2a)-10,atla,const(ref(atla,min(bc2a,tc2a)-11)));
rla:=if(currbarscount>=min(bc2a,tc2a)-10,utla,const(ref(utla,min(bc2a,tc2)-11)));
中轨a:=if(npa>fpa,if(lrla<=rha,lrla,drawnull),if(lrla>=rla,lrla,drawnull)),color628962;
上轨12a:if(npa>fpa,if(atla<=rha,atla,drawnull),if(atla>=rla,atla,drawnull)),colorwhite;
下轨12a:if(npa>fpa,if(utla<=rha,utla,drawnull),if(utla>=rla,utla,drawnull)),colorwhite;
if(npa>fpa,if(lrla-utla<atla-lrla,lrla*2-utla,if(atla-lrla<lrla-utla,lrla-(atla-lrla),drawnull)),if(lrla-utla<atla-lrla,lrla*2-utla,if(atla-lrla<lrla-utla,lrla-(atla-lrla),drawnull))),dotline,colorwhite;
上一指标公式:岛型反转抓涨停下载
下一指标公式:涨升金叉出击利空了结主图下载
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文云氏线性回归主图下载仅供学习研究。