当前位置:分析家公式网 → 股票公式 → 飞狐公式 → 一键转帖:2008年【最佳原创指标】之六:月周日K线
软件名称:[B]2008年【最佳原创指标】之六:月周日K线[/B]
软件类型:国产软件
运行环境:Win9X/2000/XP/2003/
软件语言:简体中文
授权方式:解密版
软件大小:4.00 KB
官方主页:Home Page
更新时间:2009-01-01 16:54:22
软件简介:
{月周日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);
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);
[url=http://www.70822.com/soft/sort013/sort02/down-5317.html]2008年【最佳原创指标】之六:月周日K线[/url]