5日更改 (主图,源码,贴图)
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-10-06 07:57:00
公式简介:
input:N(156,1,1000),NY(8,1,100),背景(1,1,3),SRSI(14,1,100);
DRAWGBK(背景=3, COLORRGB(40,15,55) ,COLORRGB(50,50,90),2);
DRAWGBK(背景=2, COLORRGB(90,90,90) ,COLORRGB(30,30,30),2);
DRAWGBK(背景=1,COLORRGB(0,35,0),COLORRGB(0,55,0),0);
A:=BARPOS;A1:=SYSPARAM(1);A2:=SYSPARAM(2);A3:=SYSPARAM(3);B:=DATACOUNT; KB:=B-A+1,COLORFFFFFF,LINETHICK; HM:=A3-A2;
VERTLINE(N=KB),COLORFFFFFF,POINTDOT,linethick1;
MM:=(A3-A2)/100; //定位
DW1:=A=A2+ROUND(MM*98);
DW2:=A=A2+ROUND(MM*46);
DW3:=A=A2+ROUND(MM*67);
ZQ:=DATATYPE;
BK1:=INBLOCK( 'A股板块'); BK2:=INBLOCK('深圳权证'); BK3:=INBLOCK('上海权证');
BK4:=INBLOCK('上海指数'); BK5:=INBLOCK('深圳指数');
流通:=IF((BK1 OR BK2 OR BK3)=1,CAPITAL,IF(BK4=1,ESTDATA(1),IF(BK5=1,ESTDATA(2),0)));
SOU:=VOL/CAPITAL*100;
JJ:=IF(bk1=1,AMOUNT/VOL/100,IF((BK3 or BK2)=1,AMOUNT/VOL/100,CLOSE));
HQ:=HHV(HIGH,HM);
LQ:=LLV(LOW,HM);
W:=A=SYSPARAM(3); W2:=A=SYSPARAM(2);
ZH:=HQ[B];
ZL:=LQ[B];
Q:=(ZH-ZL)/10;
PC:=CLOSE;
SPJ:=PC[B];
Q1:=SUM(IF(JJ>=ZH-1*Q,VOL,0),N)/流通*100;
Q2:=SUM(IF(JJ<ZH-1*Q AND JJ>=ZH-2*Q,VOL,0),N)/流通*100;
Q3:=SUM(IF(JJ<ZH-2*Q AND JJ>=ZH-3*Q,VOL,0),N)/流通*100;
Q4:=SUM(IF(JJ<ZH-3*Q AND JJ>=ZH-4*Q,VOL,0),N)/流通*100;
Q5:=SUM(IF(JJ<ZH-4*Q AND JJ>=ZH-5*Q,VOL,0),N)/流通*100;
Q6:=SUM(IF(JJ<ZH-5*Q AND JJ>=ZH-6*Q,VOL,0),N)/流通*100;
Q7:=SUM(IF(JJ<ZH-6*Q AND JJ>=ZH-7*Q,VOL,0),N)/流通*100;
Q8:=SUM(IF(JJ<ZH-7*Q AND JJ>=ZH-8*Q,VOL,0),N)/流通*100;
Q9:=SUM(IF(JJ<ZH-8*Q AND JJ>=ZH-9*Q,VOL,0),N)/流通*100;
Q10:=SUM(IF(JJ<ZH-9*Q,VOL,0),N)/流通*100;
STICKLINE(BACKSET(W ,Q1[A1]/2)>0,ZH-0*Q,ZH-1*Q,10,0),COLOR990000;
STICKLINE(BACKSET(W ,Q2[A1]/2)>0,ZH-1*Q,ZH-2*Q,10,0),COLOR888888;
STICKLINE(BACKSET(W ,Q3[A1]/2)>0,ZH-2*Q,ZH-3*Q,10,0),COLOR777777;
STICKLINE(BACKSET(W ,Q4[A1]/2)>0,ZH-3*Q,ZH-4*Q,10,0),COLOR666666;
STICKLINE(BACKSET(W ,Q5[A1]/2)>0,ZH-4*Q,ZH-5*Q,10,0),COLOR555555;
STICKLINE(BACKSET(W ,Q6[A1]/2)>0,ZH-5*Q,ZH-6*Q,10,0),COLOR444444;
STICKLINE(BACKSET(W ,Q7[A1]/2)>0,ZH-6*Q,ZH-7*Q,10,0),COLOR333333;
STICKLINE(BACKSET(W ,Q8[A1]/2)>0,ZH-7*Q,ZH-8*Q,10,0),COLOR222222;
STICKLINE(BACKSET(W ,Q9[A1]/2)>0,ZH-8*Q,ZH-9*Q,10,0),COLOR111111;
STICKLINE(BACKSET(W ,Q10[A1]/2)>0,ZH-9*Q,ZH-10*Q,10,0),COLOR000000;
DRAWNUMBER( C>=((ZH-1.0*Q)+(ZH-2*Q))/2 AND ISLASTBAR ,((Z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.0*Q,ZH-1*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-2.0*Q,ZH-2*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-3.0*Q,ZH-3*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-4.0*Q,ZH-4*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-5.0*Q,ZH-5*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-6.0*Q,ZH-6*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-7.0*Q,ZH-7*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-8.0*Q,ZH-8*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-9.0*Q,ZH-9*Q,2),COLOR000000,shift2;
DRAWNUMBER( ISLASTBAR ,ZH-10.0*Q,ZH-10*Q,2),COLOR000000,shift2;
DRAWNUMBER( C>=ZH-1.0*Q AND ISLASTBAR ,ZH-1.0*Q,ZH-1*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-2.0*Q AND ISLASTBAR ,ZH-2.0*Q,ZH-2*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-3.0*Q AND ISLASTBAR ,ZH-3.0*Q,ZH-3*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-4.0*Q AND ISLASTBAR ,ZH-4.0*Q,ZH-4*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-5.0*Q AND ISLASTBAR ,ZH-5.0*Q,ZH-5*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-6.0*Q AND ISLASTBAR ,ZH-6.0*Q,ZH-6*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-7.0*Q AND ISLASTBAR ,ZH-7.0*Q,ZH-7*Q,2),COLOR444444,shift2;
DRAWNUMBER( C>=ZH-8.0*Q AND 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*Q))/2 AND ISLASTBAR ,((ZH-8.0*Q)+(ZH-9*Q))/2,((ZH-8.0*Q)+(ZH-9*Q))/2,2),COLOR000000,shift2;
DRAWNUMBER( C<((ZH-9.0*Q)+(ZH-10*Q))/2 AND ISLASTBAR ,((ZH-9.0*Q)+(ZH-10*Q))/2,((ZH-9.0*Q)+(ZH-10*Q))/2,2),COLOR000000,shift2;
DRAWTEXT(ISLASTBAR,ZH-0*Q,'支撑压力'),shift1,colorBBBBBB,PXUP20;
DRAWTEXT(ISLASTBAR,ZH-0*Q,'筹码集中'),shift1,color00BBBB,PXDN20;
价格修正1:=(CLOSE+HIGH+OPEN+LOW+(CLOSE+OPEN+LOW+HIGH)/4+(OPEN+CLOSE)/2+(LOW+HIGH)/2+(OPEN+LOW)/2+(CLOSE+LOW)/2+(CLOSE+HIGH)/2+(OPEN+HIGH)/2+(CLOSE+HIGH+OPEN)/3+(HIGH+OPEN+LOW)/3+(CLOSE+HIGH+LOW)/3+(OPEN+LOW+CLOSE)/3+(HIGH+LOW+CLOSE*2)/4)/16;
价格修正:=((((OPEN * 0.25) + (CLOSE * 0.45)) + (LOW * 0.15)) + (HIGH * 0.15));
As0Q:=(C-LLV(L,3))/(HHV(H,3)-LLV(L,3));
As1Q:=SMA(As0Q,2,1);
As2Q:=SMa(As1Q,2,1);
As3Q:=3*As1Q-2*As2Q ;
As4Q:=2*As3Q-0.5;
As5Q:=C*(1-(As4Q-As2Q)/15);
x1Q:=价格修正1;
x2Q:=wma(wma(x1Q,3),5);
x3Q:=reverse(x1Q)+2*x2Q;
x4Q:=wma(wma(x1Q,1),5);
x5Q:=reverse(x1Q)+2*x4Q;
x6Q:=3.5*x5Q-2.5*sma(x5Q,2,1);
JZD:=(As5Q*2+x6Q*3)/5;
x66:=4*x5Q-3*sma(x5Q,2,1);
JZDd:=(As5Q*2+x66*3)/5;
zzcdp3:=REF(llv(jzd,5),BARSLAST(CROSS(c,ma(c,5))));
zzcdp2x:=REF(hhv(jzd*1,10),BARSLAST(CROSS(ma(c,5),c)));
zycdp3:=REF(llv(jzdd/1.0175,5),BARSLAST(CROSS(c,ma(c,5))));
zycdp2x:=REF(hhv(jzdd*1.015,10),BARSLAST(CROSS(ma(c,5),c)));
上档:zycdp2X,colorFFAA00,LINETHICK0;
下档:zycdp3,color999999,LINETHICK0;
KDJ中:(zYcdp3+zYcdp2X)/2,color00ffff,LINETHICK0;
DRAWICON(CROSS(zZcdp2X,C) AND zZcdp2X>REF(zZcdp2X,1),上档,11),PXUP7;
u85:=(85/40-1)*(ma(c,30)/20)*4+c,color888800;
u73:=(73/40-1)*(ma(c,30)/20)*4+c,color008888;
u60:=(60/40-1)*(ma(c,30)/20)*4+c,color880088;
u20:=(20/40-1)*(ma(c,30)/20)*4+c,color888800;
下底:=REF(llv(u20,10),BARSLAST(CROSS(c,ma(c,5))));
上压:=REF(hhv(u60,10),BARSLAST(CROSS(ma(c,5),c)));
DRAWICON(CROSS(L,下底),L,10),PXDN10;
RSI中:=(上压+下底)/2;
DRAWTEXT(C>=RSI中 AND ISLASTBAR,RSI中,'RSI中'),shift10,color0000FF,PXUP8;
DRAWTEXT(C<RSI中 AND ISLASTBAR,RSI中,'RSI中'),shift10,colorFF3300,PXUP8;
STICKLINE((OPEN >= CLOSE),HIGH,LOW,0,0),colorFFEE00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,7,0),colorFFEE00;
STICKLINE((CLOSE >= OPEN),LOW,HIGH,0,0),color4040FF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,7,0),color4040FF;
STICKLINE((OPEN >= CLOSE AND zzcdp3>C),HIGH,LOW,0,0),color448800;
STICKLINE((OPEN >= CLOSE AND zzcdp3>C),O,C,7,0),color448800;
STICKLINE((C >O AND zzcdp3>C),HIGH,LOW,0,0),color448800;
STICKLINE((C>O AND zzcdp3>C),O,C,7,1),color448800;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,H,L,1,0),colorFFFFFF;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,8,0),color999999;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,7,0),colorAAAAAA;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,6,0),colorBBBBBB;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,5,0),colorCCCCCC;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,4,0),colorDDDDDD;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,3,0),colorEEEEEE;
STICKLINE(CROSS(L,下档) AND REF(下档,1)>下档,O,C,2,0),colorFFFFFF;
STICKLINE(CROSS(C,KDJ中),C,H,0,0),color0000FF;
STICKLINE(CROSS(C,KDJ中),O,L,0,0),color00FF00;
STICKLINE(CROSS(C,KDJ中),O,(C+O)/2,7,0),color00FF00;
STICKLINE(CROSS(C,KDJ中),C,(C+O)/2,7,0),color0000FF;
varaQ:=CROSS(C,上档);
stickline(varaQ,c,(o+c)/2,8,0),colorff11ff;
stickline(varaQ,c,(o+c)/2,7,0),colorff33ff;
stickline(varaQ,c,(o+c)/2,6,0),colorff55ff;
stickline(varaQ,c,(o+c)/2,5,0),colorff77ff;
stickline(varaQ,c,(o+c)/2,4,0),colorff99ff;
stickline(varaQ,c,(o+c)/2,3,0),colorffbbff;
stickline(varaQ,c,(o+c)/2,1.5,0),colorffddff;
varCQ:=CROSS(C,上档);
stickline(varcQ,o,(o+c)/2,8,0),color003300;
stickline(varcQ,o,(o+c)/2,7,0),color005500;
stickline(varcQ,o,(o+c)/2,6,0),color007700;
stickline(varcQ,o,(o+c)/2,5,0),color009900;
stickline(varcQ,o,(o+c)/2,4,0),color00bb00;
stickline(varcQ,o,(o+c)/2,3,0),color00dd00;
stickline(varcQ,o,(o+c)/2,1.5,0),color00ff00;
重心:=价格修正1,COLORYELLOW,LINETHICK1;
RSI:=SMA(MAX(重心-REF(重心,1),0),SRSI,1)/SMA(ABS(重心-REF(重心,1)),SRSI,1);
GAO:=HHV(C,60)-LLV(C,60);
RSIY:重心+(RSI-0.5)*GAO,COLORMAGENTA;
A1Y:=IF(CAPITAL=0,REF(H,3)=HHV(H,21),REF(H,3)=HHV(H,13));
B1Y:=FILTER(A1Y,3); C1Y:=BACKSET(B1Y,3+1); D1Y:=FILTER(C1Y,3);
A2Y:=IF(CAPITAL=0,REF(L,3)=LLV(L,21),REF(L,3)=LLV(L,13));
B2Y:=FILTER(A2Y,3); C2Y:=BACKSET(B2Y,3+1); D2Y:=FILTER(C2Y,3);
E1Y:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2; E2Y:=(H+L)/2;
H1Y:=(D1Y AND NOT(D2Y AND E1Y>=E2Y)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1Y:=(D2Y AND NOT(D1Y AND E1Y=E2Y));
X1Y:=REF(BARSLAST(H1Y),1)+1; F1Y:=BACKSET(H1Y AND COUNT(L1Y,X1Y)>0,LLVBARS(IF(L1Y,L,10000),X1Y));
G1Y:=F1Y>REF(F1Y,1); I1Y:=BACKSET(G1Y,2); LDY:=I1Y>REF(I1Y,1);
L2Y:=LDY OR ISLASTBAR OR BARSCOUNT(C)=1; X2Y:=REF(BARSLAST(L2Y),1)+1;
F2Y:=BACKSET(L2Y AND COUNT(H1Y,X2Y)>0,HHVBARS(IF(H1Y,HIGH,0),X2Y)); G2Y:=F2Y>REF(F2Y,1); I2Y:=BACKSET(G2Y,2);
HDY:=I2Y>REF(I2Y,1);
XL_1:=BARSLAST(HDY)+1; XL_2:=if(XL_1>0,RSIY>=HHV(RSIY,XL_1),0);{起点} XL_3:=XL_1>0 and BARPOS=SYSPARAM(1);{支点}
DRAWLINE(XL_2,RSIY,XL_3,RSIY,1),COLOR0000AA;{射线}
值:=LINEVALUE(XL_2,RSIY,XL_3,RSIY,0,0);
DRAWICON(CROSS(RSIY,值) and RSIY>值*1.01,值,4),PXDN40;
DRAWICON(CROSS(RSIY,值) and RSIY>值*1.01,值,4),PXDN20;
PARTLINE(上档>C,上档),COLORFF8800,LINEDOT;
PARTLINE(C>=上档,上档),COLOR00DDFF;
PARTLINE(KDJ中>C,KDJ中),COLOR00FF00,LINEDOT;
PARTLINE(C>=KDJ中,KDJ中),COLOR00DDFF,linethick1;
stickline(C>=上档 AND C>=KDJ中,KDJ中,上档,1,0),color00DDFF,linethick1,pointdot;
[url=http://www.goodgupiao.com/gupiaogongshi/15798.html][B]5日更改 (主图,源码,贴图)[/B][/url]