优化整合指标 单阳不破 一阳穿三线 幅度线 均价线 布林线 支撑与压力线
此指标是以某日期为定点结合量价,此指标可调整转换均价线或布林线以”研判涨幅度“买卖。
图中的修饰符{信号}是出布林线上轨和rsi>76 rsi>80.k线有单阳不破和一阳破三线。
{优化整合主图 单阳不破 一阳穿三线 幅度线 均价线 布林线 支撑与压力线}
input:rqa(2011,1990,3000),rqb(1,1,12),rqc(1,1,31),df(0,0,6),fa(0,0,2),ea(0,0,2);
input:p1(5,0,255),p2(10,0,255),p3(20,0,255),p4(55,0,255),p5(120,0,255);
ttt:=islastbar=1;
as1:=((h-l)/l)*100;
as2:=h-l;
mai:=c*1.015;
maii:=c*1.03;
drawtextex(ttt,0,310,1,'▼明短线赢利[1.5%--3%:]'+'/'+numtostr(mai[sysparam(1)],2)+'--'+numtostr(maii [sysparam(1)],2)),color00dd00;
drawtextex(ttt,0,176,1,'【振幅:'+numtostr(as1[sysparam(1)],2)+'% '+numtostr(as2[sysparam(1)],2)+'元 】'+''),colordddd00;
drawtextex(ttt,0,1,1,'【代码:'+stklabel+' 名称:'+stkname+'】'),colorffffff;//drawtextex(ttt,0,270,14,'【创于2011.02.17晚】'),colorffffff;
aa:=blkname;
bb:=strleft(aa,strfind(aa,',',1)-1);
k:=stkcount(bb);
syl:=c/finance(33);
drawtextex(ttt and fa,0,3,14,' 所属板块: '+bb+', 共有:'+numtostr(k,0)+' 家上市公司'+' 发行价'+numtostr(finance(51),2)+'元'+' 发行量'+numtostr(finance(52),2)+ '万股【市盈率:'+numtostr(syl,2)),colorddaadd;
rqd:=(rqa-1900)*10000+rqb*100+rqc;
dj:=ref(l,barslast(date<=rqd ));//求某一日期的最低价
上涨:=barssince(backset(barstatus=2,barslast(l=dj)+1));
vertline(dj and date>=rqd and df>=1),color333333,linedot;//画垂直线
stickline(c>=o,low,high,0.5,0),colorff;
stickline(c>=o,close,open,8,0),color102088;
stickline(c>=o,close,open,7,0),color102099;
stickline(c>=o,close,open,6,0),color1020aa;
stickline(c>=o,close,open,5,0),color1020bb;
stickline(c>=o,close,open,4,0),color1020cc;
stickline(c>=o,close,open,3,0),color1020dd;
stickline(c>=o,close,open,2,0),color1020ee;
stickline(c>=o,close,open,1,0),color1020ff;
stickline(c<=o,low,high,0.5,0),colorff8800;
stickline(c<=o,close,open,8,0),colorff7700;
stickline(c<=o,close,open,7,0),colorff8800;
stickline(c<=o,close,open,6,0),colorff9900;
stickline(c<=o,close,open,5,0),colorffaa00;
stickline(c<=o,close,open,4,0),colorffbb00;
stickline(c<=o,close,open,3,0),colorffcc00;
stickline(c<=o,close,open,2,0),colorffdd00;
stickline(c<=o,close,open,1,0),colorffee00;
polyline(date>=rqd and df>=1,dj),color999999;//实用画直线
polyline(date>=rqd and df>=2,dj*1.03),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=2,dj*1.05),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=3,dj*1.08),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=3,dj*1.13),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=4,dj*1.18),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=4,dj*1.25),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=5,dj*1.34),color999999,linedot;//实用画直线
polyline(date>=rqd and df>=5,dj*1.37),color999999,linedot;//实用画直线
drawtext(上涨=0 and df>=1,dj,'1'),colorffffff,pxdn5;
drawtext(上涨=1 and df>=1,dj,'2'),colorffffff,pxdn5;
drawtext(上涨=2 and df>=1,dj,'3'),colorffffff,pxdn5;
drawtext(上涨=3 and df>=1,dj,'4'),colorffffff,pxdn5;
drawtext(上涨=4 and df>=1,dj,'5'),colorffffff,pxdn5;
drawtext(上涨=5 and df>=1,dj,'6'),colorffffff,pxdn5;
drawtext(上涨=6 and df>=1,dj,'7'),colorffffff,pxdn5;
drawtext(上涨=7 and df>=1,dj,'8'),colorffffff,pxdn5;
drawtext(上涨=8 and df>=1,dj,'9'),colorffffff,pxdn5;
drawtext(上涨=9 and df>=1,dj,'10'),colorffffff,pxdn5;
drawtext(上涨=10 and df>=1,dj,'11'),colorffffff,pxdn5;
drawtext(上涨=11 and df>=1,dj,'12'),colorffffff,pxdn5;
{单阳不破}
//阳涨幅:=4;
//阳倍量:=2;
//单阳:=c>o*(1+阳涨幅/100) and vol>ref(vol,1)*阳倍量;
阳涨幅:=3.5;
阳倍量:=1.9;
单阳收:=c;
单阳开:=o;
单阳:=单阳收>=ref(c,1)*(1+阳涨幅/100)and vol>ref(vol,1)*阳倍量;
drawtext(barstatus=0 and 单阳,l,'阳'),color00ffff,pxdn5;
高不破价:=ref(c,barslast(单阳));
低不破价:=ref(l,barslast(单阳));
单阳不破:=barstatus=0 and barslast(单阳)<11 and (llv(l,barslast(单阳))>低不破价 or llv(l,barslast(单阳))=低不破价);
stickline(单阳不破,低不破价-低不破价*0.0005,低不破价,11,0),colorgreen;
stickline(单阳不破,高不破价,高不破价,11,0),colorred;
stickline(单阳,单阳开,单阳收,6,0),coloryellow;
qkb:=if(c>o,o,c);
qkab:=if(c>o,o+(c-o)*0.75,o+(c-o)*0.75);
stickline(barstatus=0 and 单阳,qkb,qkab,6,0),colorff2693;
实体幅度2:=ref((o+(c-o)*0.667),barslast(单阳));{//当日实体幅度的2/3}
实体幅度1:=ref((o+(c-o)*0.333),barslast(单阳));{//当日实体幅度的1/3}
幅度的1二:=ref((l+(h-l)/2),barslast(单阳));{//当日幅度的1/2}
stickline(单阳不破,幅度的1二,幅度的1二,8,1),color209fff,linedot;
stickline(单阳不破,实体幅度2,实体幅度2,4,1),colorffff00;
stickline(单阳不破,实体幅度1,实体幅度1,4,1),colorffff00;
drawtext(barslast(单阳)=1 and 单阳不破,低不破价,'1'),colorgreen,pxdn5;
drawtext(barslast(单阳)=2 and 单阳不破,低不破价,'2'),colorgreen,pxdn5;
drawtext(barslast(单阳)=3 and 单阳不破,低不破价,'3'),colorgreen,pxdn5;
drawtext(barslast(单阳)=4 and 单阳不破,低不破价,'4'),colorgreen,pxdn5;
drawtext(barslast(单阳)=5 and 单阳不破,低不破价,'5'),colorgreen,pxdn5;
drawtext(barslast(单阳)=6 and 单阳不破,低不破价,'6'),colorgreen,pxdn5;
drawtext(barslast(单阳)=7 and 单阳不破,低不破价,'7'),colorgreen,pxdn5;
drawtext(barslast(单阳)=8 and 单阳不破,低不破价,'8'),colorgreen,pxdn5;
drawtext(barslast(单阳)=9 and 单阳不破,低不破价,'9'),colorgreen,pxdn5;
drawtext(barslast(单阳)=10 and 单阳不破,低不破价,'10'),colorgreen,pxdn5;
drawtext(上涨=0 and df>=2,dj*1.03,' 3% ['+numtostr(dj*1.03,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=2,dj*1.05,' 5% ['+numtostr(dj*1.05,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=3,dj*1.08,' 8% ['+numtostr(dj*1.08,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=3,dj*1.13,' 13% ['+numtostr(dj*1.13,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=4,dj*1.18,' 18% ['+numtostr(dj*1.18,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=4,dj*1.25,' 25% ['+numtostr(dj*1.25,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=5,dj*1.34,' 34% ['+numtostr(dj*1.34,2)+']'),align1,pxdn5,colorwhite;
drawtext(上涨=0 and df>=5,dj*1.37,' 37% ['+numtostr(dj*1.37,2)+']'),align1,pxdn5,colorwhite;
{一阳穿三线}
ma2:=ema(c,2);
ma5:=ema(c,5),colorffffff;
ma13:=ema(c,13),color00ffff;
ma34:=ema(c,34),colorff00ff;
ma55:=ema(c,55),color00ff00;
ycx:=ma5>=ref(ma5,1);
h1:=max(max(ma5,ma13),ma34);
l1:=min(min(ma5,ma13),ma34);
qk:=if(c>o,o,c);
qka:=if(c>o,o+(c-o)*0.35,o+(c-o)*0.25);
一阳穿三线:= h1<c and o<l1 and ycx and ma2>ref(ma2,1);
stickline(一阳穿三线,qk,qka,6,0),coloryellow;
bq:=if((sysparam(1) = (barssince((c > 0)) + 1)),1,0);
bq1:=(h<ref(l,1));bq2:=(l>ref(h,1));
bq3:=ref(l,1)-h; bq4:=l-ref(h,1);
bq5:=ref(l,1); bq6:=h;
bq7:=ref(h,1); bq8:=l;
qzh:=if(bq1,bq1,bq2);
qzh1:=if(bq1,bq5,bq7);
qzh2:=if(bq1,bq6,bq8);
qk:=if(c>o,c,o);
qk1:=if(c>o,o,c);
qka:=if(c>o,o+(c-o)*0.65,o+(c-o)*0.35);
qkb:=if(c>o,o+(c-o)*0.35,o+(c-o)*0.65);
stickline(bq1,qka,qk,5.5,0),coloree0000;
stickline(bq2,qkb,qk1,5,0),color20ceee;
drawtext(((bq > 0) and bq1),h,'↓缺口 '+'\n '+numtostr(bq3[sysparam(1)],2)+' '+'\n '+numtostr(bq5[sysparam(1)],2)+'-'+numtostr(bq6[sysparam(1)],2)+' '),colorffffee,pxdn10,align2;
drawtext(((bq > 0) and bq2),l,'↑缺口 '+'\n '+numtostr(bq4[sysparam(1)],2)+' '+'\n '+numtostr(bq7[sysparam(1)],2)+'-'+numtostr(bq8[sysparam(1)],2)+' '),color00ffee,pxup20,align2;
drawsl(sysparam(1)=barpos and qzh,qzh1,0,0,0),color888888;//随光标显示缺口直线
drawsl(sysparam(1)=barpos and qzh,qzh2,0,0,0),color888888;
qkd:=bq8[datacount]; qke:=0;
qk:=if(bq2,1,if(bq1,-1,0));
for i=datacount-1 downto 2 do begin
if bq8[i ]<qkd then qkd:=bq8 [i ];
if bq6[i ]>qke then qke:=bq6 [i ];
if qk[i ]=1 and qkd<=bq6[i-1] then qk [i ]:=0;
if qk[i ]=-1 and qke>=bq8[i-1] then qk [i ]:=0;
end;
drawtext(qk=1,bq8,'未补'),color999999,pxup;
drawtext(qk=-1,bq6,'未补 '),color999999,pxdn ;
as:=(o+h+l+c)/4;
bl:=ema(as,17);
bls:=bl+2.58*stdp(c,20);
bl2:=bl+1.96*stdp(c,20);
bl3:=bl-1.96*stdp(c,20);
blx:=bl-2.58*stdp(c,20);
bma:if(ea=1,bls,0),linethick1,color00ffff,linedot;
bmb:if(ea=1,bl2,0),linethick1,colorff99ff,linedot;
bmc:if(ea=1,bl3,0),linethick1,colorf0ff00,linedot;
bmd:if(ea=1,blx,0),linethick1,color00ff00,linedot;
bme:if(ea=1,bl,0),linethick1,color00ffff;
blt:=barstatus=2 and ea=1;
drawtext(blt and bls>ref(bls,1),bls,'↑:'+numtostr(bls,2)),color00ffff;
drawtext(blt and bls<ref(bls,1),bls,'↓:'+numtostr(bls,2)),color4bface;
drawtext(blt and bl2>ref(bl2,1),bl2,'↑:'+numtostr(bl2,2)),colormagenta;
drawtext(blt and bl2<ref(bl2,1),bl2,'↓:'+numtostr(bl2,2)),colorf29be1;
drawtext(blt and bl>ref(bl,1),bl,' ↑:'+numtostr(bl,2)),color00ffff;
drawtext(blt and bl<ref(bl,1),bl,' ↓:'+numtostr(bl,2)),color00ff00;
drawtext(blt and bl3>ref(bl3,1),bl3,'↑:'+numtostr(bl3,2)),colorffff00;
drawtext(blt and bl3<ref(bl3,1),bl3,'↓:'+numtostr(bl3,2)),colorfad994;
drawtext(blt and blx>ref(blx,1),blx,'↑:'+numtostr(blx,2)),color00ff00;
drawtext(blt and blx<ref(blx,1),blx,'↓:'+numtostr(blx,2)),colorb7fd91;
{1.96统计学中为95%可信区间,2.58为99%可信区间,故采用1.96和2.58作为参数}
di:=ema(close,10) - ema(close,22);
partline(ea=1 and bl<ref(bl,1),bl),colorfff000,linethick1;
drawicon(cross(h,bls),h,5);
drawicon(cross(h,bl2),h,7),pxup19;
drawicon(cross(c,bl) and bl>ref(bl,1) and di>ref(di,1),l,8);
lc := ref(close,1);
rsi1:=sma(max(close-lc,0),6,1)/sma(abs(close-lc),6,1)*100;
partline(rsi1>76,h),circledot,linethick1,colorffff00,pxup5;
partline(rsi1>80,h),crossdot,linethick1,color000ff,pxup5;
drawtext((bq > 0) and rsi1>76,h,''+numtostr(rsi1[sysparam(1)],2)+':rsi>76 '),pxup29,colorffff00,align2;
drawtext((bq > 0) and cross(h,bl2),h,''+numtostr(bl2[sysparam(1)],2)+':上穿上轨'),pxup39,colorffff00,align1;
drawtext((bq > 0) and cross(h,bls),h,''+numtostr(bls[sysparam(1)],2)+':上穿外轨'),pxup39,colorffff00,align1;
mma5:=ema(as,p1);
syaa:=ema(as,p2);
syab:=ema(as,p3);
syac:=ema(as,p4);
syad:=ema(as,p5);
bma5:if(ea=2,mma5,0),linethick1,colorffffff;
bma10:if(ea=2,syaa,0),linethick1,color00ffff;
bma20:if(ea=2,syab,0),linethick1,colorff99ff;
bma55:if(ea=2,syac,0),linethick1,color209fff;
bmax:if(ea=2,syad,0),linethick1,colorffff00;
bltf:=barstatus=2 and ea=2;
drawtext(bltf and mma5>ref(mma5,1),mma5,'↑:'+numtostr(mma5,2)),colorffffff;
drawtext(bltf and mma5<ref(mma5,1),mma5,'↓:'+numtostr(mma5,2)),colorffffff;
drawtext(bltf and syaa>ref(syaa,1),syaa,'↑:'+numtostr(syaa,2)),color00ffff;
drawtext(bltf and syaa<ref(syaa,1),syaa,'↓:'+numtostr(syaa,2)),color00ffff;
drawtext(bltf and syab>ref(syab,1),syab,'↑:'+numtostr(syab,2)),colorff99ff;
drawtext(bltf and syab<ref(syab,1),syab,'↓:'+numtostr(syab,2)),colorff99ff;
drawtext(bltf and syac>ref(syac,1),syac,'↑:'+numtostr(syac,2)),color209fff;
drawtext(bltf and syac<ref(syac,1),syac,'↓:'+numtostr(syac,2)),color209fff;
fuz:=l+((h-l)/2);fus:=o+((c-o)/2); fusy:=c+((o-c)/2);ssfu:=(fuz+if(c>o,fus,fusy))/2;
fuz1:=l+((h-l)*0.333);fus1:=o+((c-o)*0.333);fus1y:=c+((o-c)*0.333);ssfu1:=(fuz1+if(c>o,fus1,fus1y))/2;
fuz2:=l+((h-l)*0.667);fus2:=o+((c-o)*0.677);fus2y:=c+((o-c)*0.667);ssfu2:=(fuz2+if(c>o,fus2,fus2y))/2;
stickline(c=c and fa,ssfu2,ssfu2,4,0),colorffaaff,linethick1;
stickline(c=c and fa,ssfu1,ssfu1,4,0),colorffaaff,linethick1;
stickline(c=c and fa,ssfu,ssfu,5.5,0),color20dfff,linethick1;
stickline(c=c and fa,if(c>o,h-((h-c)/2),h-((h-o)/2)),if(c>o,h-((h-c)/2),h-((h-o)/2)),1.3,0),coloryellow,linethick1;
stickline(c=c and fa,if(c<o,l+((c-l)/2),l+((o-l)/2)),if(c<o,l+((c-l)/2),l+((o-l)/2)),1.3,0),coloryellow,linethick1;
aj:=amount/(vol*100),colorffffff,linethick0;
drawtext(c=c and fa=2,aj,'←'),colorff5f00;
a3:=c=hhv(c,6);
a9:=c=llv(c,6);
a4:=barslast(a3);
a5:=barslast(a9);
a6:=if(a4,ref(c,a4),ref(c,a4))*1.005;
a7:=if(a5,ref(c,a5),ref(c,a5))*0.995;
partline(a6=ref(a6,1) and fa,a6),color00ff00,linedot;
partline(a7=ref(a7,1) and fa,a7),color00ffff,linedot;
涨停:=c>ref(c,1)*1.099;
盘价:ref(o,barslast(涨停)),color666666{,dotline,pointdot},linedashdot;
{添加参数精灵
{--------显示年月日低点日期--------}
调整年 param#1 显示年度
调整月 param#2 显示月份
调整日 param#3 显示日期
---------参数=1显示低点水平线------
参数=2--5 param#4 显示涨幅幅度线
参数=0--2 param#5 显示k线幅度线
参数=1--2 param#6 转换布林与ema线
--------显示均价线--------
p1计算 param#7 任意均价线;
p2计算 param#8 任意均价线;
p3计算 param#9 任意均价线;
p4计算 param#10 任意均价线;
p5计算 param#11 任意均价线;
上一指标公式:黑马五步加强版副图FH公式下载 飞狐加强版五步指标 源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文优化整合幅度线均价线布林线支撑与压力线主图公式下载 飞狐均价源码指标 源码仅供学习研究。