{----------------------波神凯线源码----------------------------------}
input:最近天(5,1,360),测量(1,1,4);
drawgbk(c>0,colorrgb(100,120,180),0,1);
当前月:=fracpart(round(当前日期/100)/100)*100;
月:=month;日:=day;
vertline(月=1 and ( 日=25)),colorffffff,linedashdot;
vertline(月=3 and ( 日=20)),colorffffff,linedashdot;
vertline(月=5 and ( 日=12)),colorffffff,linedashdot;
vertline(月=6 and (日=14 )),colorffffff,linedashdot;
vertline(月=7 and ( 日=19 )),colorffffff,linedashdot;
vertline(月=8 and ( 日=6 )),colorffffff,linedashdot;
vertline(月=9 and ( 日=18 )),colorffffff,linedashdot;
vertline(月=10 and ( 日=31)),colorffffff,linedashdot;
vertline(月=11 and ( 日=28)),colorffffff,linedashdot;
vertline(月=12 and ( 日=31)),colorffffff,linedashdot;
vertline(月=1 and ( 日=6 or 日=15 or 日=21 )),coloraaaaaa,linedashdot;
vertline(月=2 and ( 日=6 or 日=15 or 日=21 )),coloraaaaaa,linedashdot;
vertline(月=3 and ( 日=6 or 日=15 or 日=21 )),coloraaaaaa,linedashdot;
vertline(月=4 and ( 日=6 or 日=15 or 日=21 )),coloraaaaaa,linedashdot;
vertline(月=5 and ( 日=6 or 日=15 or 日=21 )),coloraaaaaa,linedashdot;
vertline(月=6 and ( 日=6 or 日=21)),coloraaaaaa,linedashdot;
vertline(月=7 and ( 日=8 or 日=15 or 日=23)),coloraaaaaa,linedashdot;
vertline(月=8 and ( 日=8 or 日=15 or 日=23)),coloraaaaaa,linedashdot;
vertline(月=9 and ( 日=8 or 日=15 or 日=23)),coloraaaaaa,linedashdot;
vertline(月=10 and ( 日=8 or 日=15 or 日=23 )),coloraaaaaa,linedashdot;
vertline(月=11 and ( 日=8 or 日=15 or 日=23)),coloraaaaaa,linedashdot;
vertline(月=12 and ( 日=8 or 日=15 or 日=23 )),coloraaaaaa,linedashdot;
n:=if(sysparam(1)=datacount,最近天,datacount-sysparam(1)+1);
hh:=hhv(high,n);
ll:=llv(low,n);
vn:=n;
if vn>datacount then
vn=datacount+1;
for i=datacount downto datacount-vn+1 do begin
hh[i]:=hh[datacount];
ll[i]:=ll[datacount];
end;
tmp:=setlbound(hh,datacount-vn+1);
tmp:=setlbound(ll,datacount-vn+1);
kkh:=barslast(h=hh);
kkl:=barslast(l=ll);
n低日:=strtonum(numtostr(ref(date,kkl),0));
n高日:=strtonum(numtostr(ref(date,kkh),0));
多空:=if(n低日>n高日,2,1),linethick0;
date1:=if(多空=1,n低日,n高日);
hh:=ref(h,barslast(date1=date));
hh2:=if(ref(h,barslast(date1=date))<ref(h,barslast(date1=date)-1),ref(h,barslast(date1=date)-1),if(ref(h,barslast(date1=date))<ref(h,barslast(date1=date)-2),ref(h,barslast(date1=date)-2),ref(h,barslast(date1=date)-1)));
ll2:=if(ref(l,barslast(date1=date))>ref(l,barslast(date1=date)-1),ref(l,barslast(date1=date)-1),if(ref(l,barslast(date1=date))>ref(l,barslast(date1=date)-2),ref(l,barslast(date1=date)-2),ref(l,barslast(date1=date)-1)));
hh31:=ref(o,barslast(date1=date));
hh32:=ref(c,barslast(date1=date));
hh3:=min(hh31,hh32);
ll3:=max(hh31,hh32);
hh4:=if(多空=1,ref(l,barslast(date=n低日)),ref(h,barslast(date=n高日)));
ll4:=if(多空=1,ref(h,barslast(barpos=sysparam(1))),ref(l,barslast(barpos=sysparam(1))));
llow:=ref(low,barslast(date1=date));
h1:=strtonum(numtostr(hh,2));
h2:=strtonum(numtostr(hh2,2));
l2:=strtonum(numtostr(ll2,2));
h3:=strtonum(numtostr(hh3,2));
l3:=strtonum(numtostr(ll3,2));
h4:=strtonum(numtostr(hh4,2));
l4:=strtonum(numtostr(ll4,2));
l1:=strtonum(numtostr(llow,2));
ll1:=if(测量=1,h1-l1,if(测量=2 and 多空=1,h2-l1,if(测量=2 and 多空<>1,h1-l2,if(测量=3 and 多空=1,h3-l1,if(测量=3 and 多空<>1,h1-l3,if(测量=4 and 多空=1,l4-h4,h4-l4))))));
ll:=strtonum(numtostr(ll1,2)),linethick0;
vertline(barpos=sysparam(1) and 多空=1 and 测量=4 and h>=ref(h,1) and h>=refx(h,1) and h>ref(h,2) and h>refx(h,2) ),colorred,linedot;
drawtext(barpos=sysparam(1) and 多空=1 and 测量=4 and h>=ref(h,1) and h>=refx(h,1) and h>ref(h,2) and h>refx(h,2),h*1.05,'←'),coloryellow;
vertline(barpos=sysparam(1) and 多空<>1 and 测量=4 and l<=ref(l,1) and l<=refx(l,1) and l<ref(l,2) and l<refx(l,2) ),colorred,linedot;
drawtext(barpos=sysparam(1) and 多空<>1 and 测量=4 and l<=ref(l,1) and l<=refx(l,1) and l<ref(l,2) and l<refx(l,2),h*1.05,'←'),coloryellow;
vertline(date=date1),colorffaaaa,linethick2;
drawtext(date=date1,sysparam(4)*0.95,'起\n \n始\n \n线'),colorffffff;
if 多空=1 then begin
开门线: partline(date>n低日,ll*1.508 + l1),linethick2,coloree99ff;;
partline(date>n低日,ll*2+ l1),color9999ff,linedot;
多2线: partline(date>n低日,ll*2.4 + l1),colorffff99,linethick1;
partline(date>n低日,ll*3.05+ l1),color99ff99,linedot;
partline(date>n低日,ll*3.75+ l1),colorff9999,linedot;
多5线: partline(date>n低日,ll*4.15 + l1),colormagenta,linethick2,linedot;
partline(date>n低日,ll*4.8+ l1),colorred,linedot;
多7线: partline(date>n低日,ll*5.5+ l1),colorcyan,linethick2;
partline(date>n低日,ll*6.1 + l1),colorgreen,linedot;
多关门线: partline(date>n低日,ll*6.9+ l1),linethick2,colorred;
drawtext(sysparam(3)=barpos,l1+ll*1.508+0.002,numtostr(l1+ll*1.508,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*2+0.002,numtostr(l1+ll*2,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*2.4+0.002,'no.2 '+numtostr(l1+ll*2.4,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*3.05+0.002,numtostr(l1+ll*3.05,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*3.75+0.002,numtostr(l1+ll*3.75,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*4.15+0.002,'no.5 '+numtostr(l1+ll*4.15,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*4.8+0.002,numtostr(l1+ll*4.8,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*5.5+0.002,'no.7 '+numtostr(l1+ll*5.5,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*6.1+0.002,numtostr(l1+ll*6.1,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,l1+ll*6.9+0.002,numtostr(l1+ll*6.9,2)),coloraaaaaa,align2;
drawtext(date=date1,ll*1.508+ l1+0.002,'多开门'),colorred;
drawtext(date=date1,ll*6.9+ l1+0.002,'多关门'),colorred;
end;
else begin
空开门线: partline(date>n高日,h1-ll*1.508),linethick2,coloree99ff;
partline(date>n高日,h1-ll*2),color9999ff,linedot;
空2线: partline(date>n高日,h1-ll*2.4),colorffff99;
partline(date>n高日,h1-ll*3.05),color99ff99,linedot;
partline(date>n高日,h1-ll*3.75),colorff9999,linedot;
空5线: partline(date>n高日,h1-ll*4.15),colormagenta;
partline(date>n高日,h1-ll*4.8),colorred,linedot;
空7线: partline(date>n高日,h1-ll*5.5),colorcyan;
partline(date>n高日,h1-ll*6.1),colorgreen,linedot;
空关门线: partline(date>n高日,h1-ll*6.9),linethick2,colorred;
drawtext(date=date1,h1-ll*1.508+0.002,'空开门'),color3333ff;
drawtext(date=date1,h1-ll*6.9+0.002,'空关门'),color3333ff;
drawtext(sysparam(3)=barpos,h1-ll*1.508+0.002,numtostr(h1-ll*1.50801,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*2+0.002,numtostr(h1-ll*2.00001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*2.4+0.002,'no.2 '+numtostr(h1-ll*2.40001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*3.05+0.002,numtostr(h1-ll*3.05001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*3.75+0.002,numtostr(h1-ll*3.75001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*4.15+0.002,'no.5 '+numtostr(h1-ll*4.15001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*4.8+0.002,numtostr(h1-ll*4.80001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*5.5+0.002,'no.7 '+numtostr(h1-ll*5.50001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*6.1+0.002,numtostr(h1-ll*6.10001,2)),coloraaaaaa,align2;
drawtext(sysparam(3)=barpos,h1-ll*6.9+0.002,numtostr(h1-ll*6.90001,2)),coloraaaaaa,align2;
end;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='1',c,numtostr(当前月,0)+'月转折日:6、15、21、*25\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='2',c,numtostr(当前月,0)+'月转折日:6、15、21\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='3',c,numtostr(当前月,0)+'月转折日:6、15、*20、21\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='4',c,numtostr(当前月,0)+'月转折日:6、15、21\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='5',c,numtostr(当前月,0)+'月转折日:6、*1 2、15、21\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='6',c,numtostr(当前月,0)+'月转折日:6、*1 4、21\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='7',c,numtostr(当前月,0)+'月转折日:8、15、*1 9、23\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='8',c,numtostr(当前月,0)+'月转折日:*6、8、15、23\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='9',c,numtostr(当前月,0)+'月转折日:8、15、*1 8、23\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='10',c,numtostr(当前月,0)+'月转折日:8、15、23、*31\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='11',c,numtostr(当前月,0)+'月转折日:8、15、23、*28\n \n \n \n '),color00ffff,align5;
drawtext(sysparam(2)=barpos and numtostr(当前月,0)='12',c,numtostr(当前月,0)+'月转折日:8、15、23、*31\n \n \n \n '),color00ffff,align5;
{-----------------------------立体k线--------------------------------------}
ko:=close;
kc:=ref(close,1);
stickline(ko<=kc ,close ,open,8,0 ),color008800;
stickline(ko<=kc ,close ,open,7,0 ),color009900;
stickline(ko<=kc ,close ,open,6,0 ),color00aa00;
stickline(ko<=kc ,close ,open,5,0 ),color00bb00;
stickline(ko<=kc,close ,open,4,0 ),color00cc00;
stickline(ko<=kc,close ,open,3,0 ),color33dd00;
stickline(ko<=kc,close ,open,2,0 ),color00ee00;
stickline(ko<=kc,close ,open,1,0 ),color66ff00;
stickline(ko>kc,close,open,8,0 ),color000088;
stickline(ko>kc,close,open,7,0 ),color000099;
stickline(ko>kc,close,open,6 ,0 ),color0000aa;
stickline(ko>kc,close,open,5,0 ),color0000bb;
stickline(ko>kc,close,open,4,0 ),color0000cc;
stickline(ko>kc,close,open,3 ,0 ),color0000dd;
stickline(ko>kc,close,open,2,0 ),color0000ee;
stickline(ko>kc,close,open,1 ,0 ),color0033ff;
stickline(ko>kc,open,low,0.5,0 ),colorred;
stickline(ko>kc,close,high,0.5 ,0 ),colorred;
stickline(ko<=kc,close,low,0.5 ,0 ),color66cc33;
stickline(ko<=kc,open,high,0.5 ,0 ),color66cc33;
上一指标公式:自动测幅波段幅度侦测工具版公式 飞狐侦测波段指标 源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文波神凯线版公式 飞狐指标 源码仅供学习研究。