指标公式详细说明
好公式网(www.goodgongshi.com)告诉您:当前正要下载:2008年最佳原创之六:月周日K线公式 飞狐周日指标指标 源码
{月周日k线}
drawgbk(1, colorrgb(50,50,50),colorrgb(100,100,100),0);
input:aa(5,1,1000),bb(20,1,1000);
drawbkbmp(c,'光和影');
{-----------------------☆功能开关------------------------}
{月--周期k线}
if datacount<bb then exit;
y1:=mod(barpos,bb);
y2:=if(y1=0,bb-1,y1-1);
y3:=barslast(y2=0);
y4:=barslast(y2=bb-1);
y5:=ref(o,y3);
y6:=hhv(h,y3+1)*(y4=0);
y7:=llv(if(l=0,100000,l),y3+1)*(y4=0);
y8:=if(y3=0,c,0);
y9:=if(y4=0,c,0);
y10:=if(y4=0,y6,0);
y11:=if(y4=0,y7,0);
for n=lbound(y8) to ubound(y8) do begin
if y8[n]>0 then begin
for z=n+bb-1 to ubound(y8) do begin
if y9[z]>0 then begin
for s=n to z-1 do begin
yc1[s]:=y9[z];
yh1[s]:=y10[z];
yl1[s]:=y11[z];
end;
break;
end;
end;
end;
end;
yxqc1:=c;
yxqh1:=hhv(h,y2[datacount]+1);
xql1:=llv(if(l=0,1000000,l),y2[datacount]+1);
yxqcc:=if(barpos>datacount-y2[datacount]-1,yxqc1[datacount],if(y2=bb-1,c,yc1));
yxqhh:=if(barpos>datacount-y2[datacount]-1,yxqh1[datacount],if(y2=bb-1,ref(yh1,1),yh1));
yxqll:=if(barpos>datacount-y2[datacount]-1,xql1[datacount],if(y2=bb-1,ref(yl1,1),yl1));
{周--周期k线}
if datacount<aa then exit;
z1:=mod(barpos,aa);
z2:=if(z1=0,aa-1,z1-1);
z3:=barslast(z2=0);
z4:=barslast(z2=aa-1);
z5:=ref(o,z3);
z6:=hhv(h,z3+1)*(z4=0);
z7:=llv(if(l=0,100000,l),z3+1)*(z4=0);
z8:=if(z3=0,c,0);
z9:=if(z4=0,c,0);
z11:=if(z4=0,z6,0);
z12:=if(z4=0,z7,0);
for n=lbound(z8) to ubound(z8) do begin
if z8[n]>0 then begin
for z=n+aa-1 to ubound(z8) do begin
if z9[z]>0 then begin
for s=n to z-1 do begin
zc1[s]:=z9[z];
zh1[s]:=z11[z];
zl1[s]:=z12[z];
end;
break;
end;
end;
end;
end;
zzc1:=c;
zzh1:=hhv(h,z2[datacount]+1);
zzl1:=llv(if(l=0,1000000,l),z2[datacount]+1);
zzcc:=if(barpos>datacount-z2[datacount]-1,zzc1[datacount],if(z2=aa-1,c,zc1));
zzhh:=if(barpos>datacount-z2[datacount]-1,zzh1[datacount],if(z2=aa-1,ref(zh1,1),zh1));
zzll:=if(barpos>datacount-z2[datacount]-1,zzl1[datacount],if(z2=aa-1,ref(zl1,1),zl1));
{-----------------【图解模板】---------------------}
{月--周期k线}
fillrgn(y2>0 and yxqcc>=y5,yxqhh,yxqll),colora8a6ff;
fillrgn(y2>0 and yxqcc<y5,yxqhh,yxqll),colord8a668;
{周--周期k线}
fillrgn(z2>0 and zzcc>=z5,zzhh,zzll),color8787e9;
fillrgn(z2>0 and zzcc<z5,zzhh,zzll),colorff8e18;
{日--k线}
stickline(c>=o,c,o,7,0),colorred;
stickline(c>=o,c,o,4,0),color5070ff;
stickline(c>=o,c,o,2,0),color9fff;
stickline(c>=o,h,l,0,0),coloryellow;
stickline(c<=o,c,o,7,0),color8f2020;
stickline(c<=o,c,o,4,0),colora36600;
stickline(c<=o,c,o,2,0),colord9cc66;
stickline(c<=o,h,l,0,0),colorffdd99;
{主图成交量}
hh:=sysparam(4);
ll:=sysparam(5);
x:=ll-(hh-ll+mindiff)/5;
y:=hhv(vol,sysparam(3)-sysparam(2)+1);
yvb:=y[sysparam(3)]/(ll-x+mindiff);
z:=vol/yvb+x;
stickline(close>ref(close,1),x,z,7.5,1),color700084;
stickline(close>ref(close,1),x,z,7,1),color000099;
stickline(close>ref(close,1),x,z,6.5,1),colora3;
stickline(close>ref(close,1),x,z,6,1),color0000aa;
stickline(close>ref(close,1),x,z,5.5,1),colorb7;
stickline(close>ref(close,1),x,z,5,1),color0000bb;
stickline(close>ref(close,1),x,z,4.5,1),colorcd;
stickline(close>ref(close,1),x,z,4,1),color0000cc;
stickline(close>ref(close,1),x,z,3.5,1),colore9;
stickline(close>ref(close,1),x,z,3,1),color0000dd;
stickline(close>ref(close,1),x,z,2.5,1),color754e9;
stickline(close>ref(close,1),x,z,2,1),color0000ee;
stickline(close>ref(close,1),x,z,1.5,1),color76ef3;
stickline(close>ref(close,1),x,z,1,0),color0000ff;
stickline(close>ref(close,1),x,z,0.1,0),color77bf3;
stickline(close<=ref(close,1),x,z,8,0),color008800;
stickline(close<=ref(close,1),x,z,7,0),color009900;
stickline(close<=ref(close,1),x,z,6,0),color00aa00;
stickline(close<=ref(close,1),x,z,5,0),color00bb00;
stickline(close<=ref(close,1),x,z,4,0),color00cc00;
stickline(close<=ref(close,1),x,z,3,0),color00dd00;
stickline(close<=ref(close,1),x,z,2,0),color00ee00;
stickline(close<=ref(close,1),x,z,1,0),color00ff00;
五日量:ma(z,5);
十日量:ma(z,10);
var1:=ref((low+open+close+high)/4,1);
var2:=sma(abs(low-var1),13,1)/sma(max(low-var1,0),10,1);
var3:=ema(var2,10);
var4:=llv(low,33);
var5:=ema(if(low<=var4,var3,0),3);
主力进场:if(var5>ref(var5,1),var5,0),colorred,linethick;
主力洗盘:if(var5<ref(var5,1),var5,0),colorgreen,linethick;
ay:=hhv(var5,sysparam(3)-sysparam(2)+1);
ayvb:=ay[sysparam(3)]/(ll-x+mindiff)*3;
az:=var5/ayvb+x;
stickline(var5>ref(var5,1),x,az,8,0 ),color3afa;
stickline(var5>ref(var5,1),x,az,7,0),color5afb;
stickline(var5>ref(var5,1),x,az,6,0 ),color7afc;
stickline(var5>ref(var5,1),x,az,5,0),color9afd;
stickline(var5>ref(var5,1),x,az,4,0),coloraafe;
stickline(var5>ref(var5,1),x,az,3,0 ),colorbbff;
stickline(var5>ref(var5,1),x,az,2,0 ),colorccff;
stickline(var5>ref(var5,1),x,az,1,0),color10ddff;
stickline(var5<ref(var5,1),x,az,8,0),colorff5b00;
stickline(var5<ref(var5,1),x,az,7,0),colorff6c00;
stickline(var5<ref(var5,1),x,az,6,0),colorff7b00;
stickline(var5<ref(var5,1),x,az,5,0),colorff9c00;
stickline(var5<ref(var5,1),x,az,4,0),colorffbe00;
stickline(var5<ref(var5,1),x,az,3,0),colorffee00;
stickline(var5<ref(var5,1),x,az,2,0),colorffff30;
stickline(var5<ref(var5,1),x,az,1,0),colorffff90;
ma10:ma(c,10);
ma20:ma(c,20);
ma60:ma(c,60);
ma120:ma(c,120);
ma250:ma(c,250);
>>>使用本站搜索工具可以找到更多“2008年最佳原创之六:月周日K线公式 飞狐周日指标指标 源码”