分时K线叠加日K线 日K线叠加周线结合涨跌幅度赢利有保障 主图(源码 贴图)
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-02-06 09:46:00
公式简介:
祝大家兔年吉祥 心想事成 财源广进!!!
此指标可调出任意均线,在分时K线叠加日K线 日K线叠加周线 涨跌幅度线结合研判做交易!!
适合做T做短做中。
INPUT:df(0,0,55),gf(0,0,555),日(0,0,1),周(0,0,1),P1(0,0,255),P2(0,0,255),P3(0,0,255),P4(0,0,255),P5(0,0,255);
TBS:=POW(10,ABS(LOG(MINDIFF)));
BZ:=WEEKDAY;ZZ:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;
ZW:=BARSLAST(ZZ),LINETHICK;
Zdg:=ZW=0 or ISLASTBAR;
Zwx:=0*c;
for Z=datacount-1 downto lbound(Zdg) do
if Zdg[Z] then
Zwx[Z]:=0;
else
Zwx[Z]:=Zwx[Z+1]+1;
Zr:=BACKSET(ISLASTBAR,Zw+1)-ISLASTBAR;
Zwx:=refx(Zwx,1)+Zr,LINETHICK;
zq:=BARSLAST(ref(Zwx,1)=0 or BARPOS=1)+1;
Zo:=ref(o,Zw);
Zh:=hhv(h,Zw+1);
ZL:=LLv(L,Zw+1);
Z开:ROUND(ZO*TBS)/TBS,LINETHICK,COLOReeeeFF;
Z高:ROUND(refx(Zh,Zwx)*TBS)/TBS,LINETHICK,COLOReeaaFF;
Z低:ROUND(refx(ZL,Zwx)*TBS)/TBS,LINETHICK,COLOR00ee00;
Z收:ROUND(refx(c,Zwx)*TBS)/TBS,LINETHICK,COLOR00eeFF;
Z,:=Z收>Z开 or (Z收=Z开 and Z收>ref(Z收,Zw+1));
Zj:=cross(Zw,Zwx);
yt:=if(zq=1 and refx(zq,2)=1,13,if(refx(zq,1)=1 or zq=1,7,14));
ss:=周;
STICKLINE(zw>0 and Z, and Zj and ss,Z低,Z高,3,0),Color613076;//Color3547E8 Color613076 Color666DCC
STICKLINE(Z开<=Z收 and ss,Z开,Z收,YT,0),Color613076,LINEDOT;
STICKLINE(Zw>0 and not(Z,) and Zj and ss,Z低,Z高,3,0),Color007900;//ColorFDDD32 ColorFA7D32
STICKLINE(Z开>=Z收 and ss,Z开,Z收,YT,0),Color007900,LINEDOT;
RRL:=DAY;
RRL:=RRL-REF(RRL,1)<>0 OR BARPOS=1;
Rw:=BARSLAST(RRL),LINETHICK;
Rdg:=Rw=0 or ISLASTBAR;
Rwx:=0*C;
for R=datacount-1 downto lbound(Rdg) do
if Rdg[R] then
Rwx[R]:=0;
else
Rwx[R]:=Rwx[R+1]+1;
Rr:=BACKSET(ISLASTBAR,Rw+1)-ISLASTBAR;
Rwx:=refx(Rwx,1)+Rr,LINETHICK;
Rzq1:=BARSLAST(ref(Rwx,1)=0 or BARPOS=1)+1;
Roo:=ref(o,Rw);
RRh:=hhv(h,Rw+1);
RRL:=LLv(L,Rw+1);
R开:ROUND(ROO*TBS)/TBS,LINETHICK,COLOReeeeFF;
R高:ROUND(refx(RRh,Rwx)*TBS)/TBS,LINETHICK,COLOReeaaFF;
R低:ROUND(refx(RRL,Rwx)*TBS)/TBS,LINETHICK,COLOR00ee00;
R收:ROUND(refx(c,Rwx)*TBS)/TBS,LINETHICK,COLOR00eeFF;
RF:=R收>R开 or (R收=R开 and R收>ref(R收,Rw+1));
Rj:=cross(Rw,Rwx);
Ryt1:=if(Rzq1=1 and refx(Rzq1,2)=1,13,if(refx(Rzq1,1)=1 or Rzq1=1,7,14));
RRK:=ROUND(ROO*TBS)/TBS;
RRS:=ROUND(refx(c,Rwx)*TBS)/TBS;
AR:=日;
STICKLINE(Rw>0 and RF and Rj and AR,R低,R高,5,0),ColorD24A92;
STICKLINE(R开<=R收 and AR,R开,R收,RYT1,0),ColorD24A92,LINEDOT;
STICKLINE(Rw>0 and not(RF) and Rj and AR,R低,R高,5,0),Color6AA932;
STICKLINE(R开>=R收 and AR,R开,R收,RYT1,0),Color6AA932,LINEDOT;
TJA:=CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1);
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;
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,'【创于2010.11.20晚】'),ColorffFFFF;
aa:=BLKNAME;
BB:=STRLEFT(AA,STRFIND(AA,',',1)-1);
K:=STKCOUNT(BB);
DRAWTEXTEX(TTT,0,270,14,' 所属板块: '+BB+', 共有:'+NUMTOSTR(K,0)+' 家上市公司'),COLORDDaaDD;
最低:=TROUGHBARS(L,DF,1);
ZD1:=SUMBARS(最低=0,1)-1; ZD2:=DATACOUNT-ZD1[DATACOUNT]; ZD3:=IF(BARPOS=ZD2,最低=0,0);
ZD4:=IF(ZD3,1,0); KZ:=BARSLAST(ZD4)+1;
低价:=REF(L,BARSLAST(最低=0));
DRAWLINE(最低=0 and DF>0,L,ISLASTBAR,低价,0),Color999999;
DRAWLINE(最低=0 and df>0,L*1.03,ISLASTBAR,低价*1.03,0),Color999999;
DRAWLINE(最低=0 and df>0,L*1.05,ISLASTBAR,低价*1.05,0),Color999999;
DRAWLINE(最低=0 and df>0,L*1.08,ISLASTBAR,低价*1.08,0),Color999999;
DRAWLINE(最低=0 and df>=2,L*1.13,ISLASTBAR,低价*1.13,0),Color999999;
DRAWLINE(最低=0 and df>=2,L*1.18,ISLASTBAR,低价*1.18,0),Color999999;
//DRAWLINE(最低=0 and df>=2,L*1.25,ISLASTBAR,低价*1.25,0),Color999999;
DRAWTEXT(KZ=1 and df>0,低价,NUMTOSTR(低价,2)+'[ 0%]'),ALIGN2,PXUP8,COLORWHITE;
DRAWTEXT(KZ=1 and df>0,低价*1.03,'3% ['+NUMTOSTR(低价*1.03,2)+']'),ALIGN2,PXUP8,COLORWHITE;
DRAWTEXT(KZ=1 and df>0,低价*1.05,'5% ['+NUMTOSTR(低价*1.05,2)+']'),ALIGN2,PXUP8,COLORWHITE;
DRAWTEXT(KZ=1 and df>0,低价*1.08,'8% ['+NUMTOSTR(低价*1.08,2)+']'),ALIGN2,PXUP8,COLORWHITE;
DRAWTEXT(KZ=1 and df>=2,低价*1.13,'13% ['+NUMTOSTR(低价*1.13,2)+']'),ALIGN2,PXUP8,COLORWHITE;
DRAWTEXT(KZ=1 and df>=2,低价*1.18,'18% ['+NUMTOSTR(低价*1.18,2)+']'),ALIGN2,PXUP8,COLORWHITE;
//DRAWTEXT(KZ=1 and df>=2,低价*1.25,'25% ['+NUMTOSTR(低价*1.25,2)+']'),ALIGN2,PXUP8,COLORWHITE;
FU:=C-低价;
到当前幅度%:=FU/低价*100;
DRAWTEXTEX(TTt,0,3,15,'【'+NUMTOSTR(低价,2)+'低--到当前幅度 C:'+NUMTOSTR(到当前幅度%[SYSPARAM(1)],2)+'% 涨跌:'+NUMTOSTR(FU[SYSPARAM(1)],2)+'】'),Color999999;
最高:=PEAKBARS(h,GF,1);
ZG1:=SUMBARS(最高=0,1)-1; ZG2:=DATACOUNT-ZG1[DATACOUNT]; ZG3:=IF(BARPOS=ZG2,最高=0,0);
ZG4:=IF(ZG3,1,0); KZA:=BARSLAST(ZG4)+1;
高价:=REF(H,BARSLAST(最高=0));
DRAWLINE(最高=0 and GF>0,H,ISLASTBAR,高价,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.97,ISLASTBAR,高价*0.97,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.95,ISLASTBAR,高价*0.95,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.92,ISLASTBAR,高价*0.92,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.87,ISLASTBAR,高价*0.87,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.82,ISLASTBAR,高价*0.82,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.72,ISLASTBAR,高价*0.72,0),Color999900;
DRAWLINE(最高=0 and Gf>0,H*0.64,ISLASTBAR,高价*0.64,0),Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价,NUMTOSTR(高价,2)+'[ 0%]'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.97,'3% ['+NUMTOSTR(高价*0.97,2)+']'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.95,'5% ['+NUMTOSTR(高价*0.95,2)+']'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.92,'8% ['+NUMTOSTR(高价*0.92,2)+']'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.87,'13% ['+NUMTOSTR(高价*0.87,2)+']'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.82,'18% ['+NUMTOSTR(高价*0.82,2)+']'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.72,'28% ['+NUMTOSTR(高价*0.72,2)+']'),ALIGN2,PXUP8,,Color999900;
DRAWTEXT(KZA=1 and Gf>0,高价*0.64,'36% ['+NUMTOSTR(高价*0.36,2)+']'),ALIGN2,PXUP8,,Color999900;
FUG:=高价-C;
高到当前幅度%:=FUG/高价*100;
DRAWTEXTEX(TTt,0,3,30,'【'+NUMTOSTR(高价,2)+'高--到当前幅度 C:-'+NUMTOSTR(高到当前幅度%[SYSPARAM(1)],2)+'% 涨跌:-'+NUMTOSTR(FUG[SYSPARAM(1)],2)+'】'),ColorFFFF00;
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;
JJX: MA(AS,p1),linethick1,ColorFFFFFF;
JJA: MA(AS,p2),linethick1,Color00FFFF;
JJB: MA(AS,p3),linethick1,ColorFF55FF;
JJC: MA(AS,p4),linethick1,Color00FF00;
JJD: MA(AS,p5),linethick1,ColorFFFF00;
BLT:=BARSTATUS=2;
DRAWTEXT(BLT AND JJX>REF(JJX,1),JJX,'↑'+NUMTOSTR(p1,0)+':'+NUMTOSTR(JJX,2)),COLORCCDDCC;
DRAWTEXT(BLT AND JJX<REF(JJX,1),JJX,'↓'+NUMTOSTR(p1,0)+':'+NUMTOSTR(JJX,2)),ColorDDDDDD;
DRAWTEXT(BLT AND JJA>REF(JJA,1),JJA,'↑'+NUMTOSTR(p2,0)+':'+NUMTOSTR(JJA,2)),COLOR00EEEE;
DRAWTEXT(BLT AND JJA<REF(JJA,1),JJA,'↓'+NUMTOSTR(p2,0)+':'+NUMTOSTR(JJA,2)),Color00EEEE;
DRAWTEXT(BLT AND JJB>REF(JJB,1),JJB,'↑'+NUMTOSTR(p3,0)+':'+NUMTOSTR(JJB,2)),COLORCC55CC;
DRAWTEXT(BLT AND JJB<REF(JJB,1),JJB,'↓'+NUMTOSTR(p3,0)+':'+NUMTOSTR(JJB,2)),ColorCC55CC;
DRAWTEXT(BLT AND JJC>REF(JJC,1),JJC,'↑'+NUMTOSTR(p4,0)+':'+NUMTOSTR(JJC,2)),COLOR00CC;
DRAWTEXT(BLT AND JJC<REF(JJC,1),JJC,'↓'+NUMTOSTR(p4,0)+':'+NUMTOSTR(JJC,2)),Color00CC00;
DRAWTEXT(BLT AND JJD>REF(JJD,1),JJD,'↑'+NUMTOSTR(p5,0)+':'+NUMTOSTR(JJD,2)),COLORCCCC00;
DRAWTEXT(BLT AND JJD<REF(JJD,1),JJD,'↓'+NUMTOSTR(p5,0)+':'+NUMTOSTR(JJD,2)),ColorCCCC00;
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;
{添加到参数精灵里
--------显示近期涨跌幅度--------
找近期低点 Param#1 显示涨幅幅度
找近期高点 Param#2 显示跌幅幅度
日=1 Param#3 分时叠加日线用;
周=1 Param#4 叠加日线用;
--------显示均价线--------
P1计算 Param#5 任意均价线;
P2计算 Param#6 任意均价线;
P3计算 Param#7 任意均价线;
P4计算 Param#8 任意均价线;
P5计算 Param#9 任意均价线;
[url=http://www.goodgupiao.com/gupiaogongshi/12082.html][B]分时K线叠加日K线 日K线叠加周线结合涨跌幅度赢利有保障 主图(源码 贴图)[/B][/url]