a0:=BARSCOUNT(c);a3:=SYSPARAM(3);a2:=SYSPARAM(2);
a4:=SYSPARAM(4);a5:=SYSPARAM(5);
nn0:=a3-a2;nn:=a0-a2;hh1:=(a4-a5)/8;
hh2:=hh1/4;
ll1:=llv(l,nn0);ll2:=ll1[a3];
y0:=a0>=a2;vv0:=if(y0=1 and SYSPARAM(1)>=a0,v,0);
c1:=if(BETWEEN(c,a4-0*hh1,a4-1*hh1),vv0,0);
c2:=if(BETWEEN(c,a4-1*hh1,a4-2*hh1),vv0,0);
c3:=if(BETWEEN(c,a4-2*hh1,a4-3*hh1),vv0,0);
c4:=if(BETWEEN(c,a4-3*hh1,a4-4*hh1),vv0,0);
c5:=if(BETWEEN(c,a4-4*hh1,a4-5*hh1),vv0,0);
c6:=if(BETWEEN(c,a4-5*hh1,a4-6*hh1),vv0,0);
c7:=if(BETWEEN(c,a4-6*hh1,a4-7*hh1),vv0,0);
c8:=if(BETWEEN(c,a4-7*hh1,a4-8*hh1),vv0,0);
c9:=if(BETWEEN(c,a4-8*hh1,a4-9*hh1),vv0,0);
c10:=if(BETWEEN(c,a4-9*hh1,a4-10*hh1),vv0,0);
v1:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c1,nn0),0),2)),LINETHICK;
v2:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c2,nn0),0),2));
v3:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c3,nn0),0),2));
v4:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c4,nn0),0),2));
v5:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c5,nn0),0),2));
v6:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c6,nn0),0),2));
v7:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c7,nn0),0),2));
v8:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c8,nn0),0),2));
v9:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c9,nn0),0),2));
v10:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c10,nn0),0),2));
av0:=max(v1,max(v2,max(v3,max(v4,max(v5,max(v6,max(v7,max(v8,max(v9,v10)))))))));
x1:=v1/av0>=nn/nn0 and nn>=0;
x3:=v3/av0>=nn/nn0 and nn>=0;
x5:=v5/av0>=nn/nn0 and nn>=0;
x7:=v7/av0>=nn/nn0 and nn>=0;
FILLRGN(v1/av0>=nn/nn0 and nn>=0,a4-0*hh1,a4-1*hh1+hh1*0.5),color666666;
FILLRGN(v2/av0>=nn/nn0 and nn>=0,a4-1*hh1,a4-2*hh1+hh1*0.5),color666666;
FILLRGN(v3/av0>=nn/nn0 and nn>=0,a4-2*hh1,a4-3*hh1+hh1*0.5),color666666;
FILLRGN(v4/av0>=nn/nn0 and nn>=0,a4-3*hh1,a4-4*hh1+hh1*0.5),color666666;
FILLRGN(v5/av0>=nn/nn0 and nn>=0,a4-4*hh1,a4-5*hh1+hh1*0.5),color666666;
FILLRGN(v6/av0>=nn/nn0 and nn>=0,a4-5*hh1,a4-6*hh1+hh1*0.5),color666666;
FILLRGN(v7/av0>=nn/nn0 and nn>=0,a4-6*hh1,a4-7*hh1+hh1*0.5),color666666;
FILLRGN(v8/av0>=nn/nn0 and nn>=0,a4-7*hh1,a4-8*hh1+hh1*0.5),color666666;
DRAWNUMBER(FILTER(refx(x1<ref(x1,1),6) and v1>0,10),a4,a4-0*hh1,2),COLORCYAN;
DRAWNUMBER(FILTER(refx(x3<ref(x3,1),6) and v3>0,10),(a4-2.7*3*hh2),a4-2*hh1,2),COLORCYAN;
DRAWNUMBER(FILTER(refx(x5<ref(x5,1),6) and v5>0,10),(a4-3.2*5*hh2),a4-4*hh1,2),COLORCYAN;
DRAWNUMBER(FILTER(refx(x7<ref(x7,1) and v7>0,5),10),ll2+1.1*7*hh2,a4-6*hh1,2),COLORCYAN;
W:=BARSLAST(barpos=sysparam(2));
P:=BACKSET(barpos=sysparam(3),W/2+1);
K1:=BARSLAST(CROSS(P,0.5));
KJ:=SYSPARAM(4)-SYSPARAM(5);
平衡:SYSPARAM(5)+KJ/2,COLOR00FFFF,LINEDOT;
{FILLRGN(W>K,平衡,SYSPARAM(4)),COLORFF0000;{该行设置背景色}}
VERTLINE(CROSS(P,0.5)),COLOR00FFFF,LINEDASHDOT;
压力:IF(K1>=0,SYSPARAM(4)-KJ*0.191,平衡),COLORFF00FF,LINEDOT;
支撑:IF(K1>=0,SYSPARAM(5)+KJ*0.191,平衡),COLOR00FF00,LINEDOT;
低吸:K1>=0 and CROSS(平衡,LOW),COLORFF8899,LINETHICK0;
低涨:(C/LLV(LOW,W)-1)*100,COLOR0000FF,LINETHICK0;
天:BARSLAST(L=LLV(LOW,W)),COLOR00FFFF,LINETHICK0;
{以下设置提示文字部分}
DRAWTEXT(barpos=sysparam(3),压力,'0.809'),COLOR0000FF,ALIGN1;
DRAWTEXT(barpos=sysparam(3),平衡,'0.500'),COLORFFFFFF,ALIGN1;
DRAWTEXT(barpos=sysparam(3),支撑,'0.191'),COLOR00FFFF,ALIGN1;
{以下设置个股信息}
DRAWTEXTEX(C>0,1,0,950,'所属板块:'+BLKNAME),COLORFFFFFF;
DD:=FINANCE(1);SS:=FINANCE(7);
DRAWTEXTEX(C>0,1,10,240,'总股本:'+NUMTOSTR(DD,0)+'万' +' 流通A股:'+NUMTOSTR(SS,0)+'万'),COLOR00FFFF;
DRAWTEXTEX(C>0,1,10,300,'■低点至今上涨:'+NUMTOSTR(低涨,2)+'% '+NUMTOSTR(天,0)+'天'),COLOR0000FF;
W1:=IF(barpos=sysparam(3),W+1,0);
DRAWTEXTEX(C>0,1,10,360,'■目前可见K线:'+NUMTOSTR(HHV(W1,W),0)+'天'),COLOR00FF00;
DRAWTEXTEX(C>0,1,10,420,'■建议查阅K线:短线30天,中长线120天!'),COLORFF8899;
INPUT:k(1,0,1);//n为均线参数;k=0取消画图标和均线
fc:=c;fo:=o;hh:=0*c;ll:=0*c;rr:=0*c;tj:=0*c;
tj[1]:=if(fc[1]>=fo[1],1,0);
hh[1]:=max(fc[1],fo[1]);
ll[1]:=min(fc[1],fo[1]);
rr[1]:=fo[1];
for i=2 to datacount do begin
if tj[i-1]=1 then begin
if fc[i]>=rr[i-1] then begin
tj[i]:=1;
hh[i]:=max(fc[i],hh[i-1]);
ll[i]:=min(fc[i],hh[i-1]);
rr[i]:=ll[i];
end; else begin
tj[i]:=0;
hh[i]:=hh[i-1];
ll[i]:=fc[i];
rr[i]:=rr[i-1];
end;
end; else begin
if fc[i]<=rr[i-1] then begin
tj[i]:=0;
hh[i]:=max(fc[i],ll[i-1]);
ll[i]:=min(fc[i],ll[i-1]);
rr[i]:=hh[i];
end; else begin
tj[i]:=1;
hh[i]:=fc[i];
ll[i]:=ll[i-1];
rr[i]:=rr[i-1];
end;
end;
end;
STICKLINE(tj=1,hh,ll,6,1),COLORRED;
STICKLINE(tj=0,hh,ll,6,0),COLORgreen;
STICKLINE(ref(tj=0,1) and tj=1,rr,ll,6,0),COLOR00ffff;
STICKLINE(ref(tj=1,1) and tj=0,rr,hh,6,0),COLORFF5500;
XMA:=ma(c,5),COLOR00d900;
x:=(3*c+l+o+h)/6;
多空线:(20*x+19*ref(x,1)+18*ref(x,2)+17*ref(x,3)+16*ref(x,4)+15*ref(x,5)+14*ref(x,6)
+13*ref(x,7)+12*ref(x,8)+11*ref(x,9)+10*ref(x,10)+9*ref(x,11)+8*ref(x,12)
+7*ref(x,13)+6*ref(x,14)+5*ref(x,15)+4*ref(x,16)+3*ref(x,17)+2*ref(x,18)+
ref(x,20))/210,colorff00ff,linethick1;
TN:=MA(vol,75);QS:=WMA(TN,360);波动线:=DMA(C,IF(CAPITAL<1,ESTDATA(9)/ESTDATA(8),vol/CAPITAL));持股线:=WMA(波动线,74);
PARTLINE(IF(CAPITAL=0,TN>QS,波动线<C),IF(CAPITAL<1,持股线,波动线)),Color0000FF;
PARTLINE(IF(CAPITAL=0,TN<QS,波动线>C),IF(CAPITAL<1,持股线,波动线)),Color00FF00;
C1:=REF(CLOSE,1);C2:=HHV(C1,2);C3:=LLV(C1,1);ET:=HHV(C1,2);ET1:=REF(ET,1);
XB:=LLV(C1,1);XB1:=REF(XB,1);M:=BARSLAST(((CLOSE < XB) AND (C1 >= XB1)));
M11:=REF(M,1);N9:=BARSLAST(((CLOSE > ET) AND (C1 <= ET1)));N1:=REF(N9,1);
M21:=(BARSLAST((((M - N9) > 0) AND (M11 <= N1))) + 1);
N2:=(BARSLAST((((N9 - M) > 0) AND (N1 <= M11))) + 1);
ET2:=HHV(ET,M21);XB2:=LLV(XB,N2);
A:=IF((((M - N9) > 0) AND (M11 <= N1)),1,IF((((N9 - M) > 0) AND (N1 <= M11)),0,2));
H1:=IF(((M - N9) > 0),CLOSE,ET2);H2:=IF((A = 1),CLOSE,C2);H3:=IF(((M - N9) < 0),CLOSE,XB2);
H4:=IF((A = 1),CLOSE,XB2);H5:=IF((((M - N9) > 0) OR (A = 1)),CLOSE,H3);
H6:=REF(H5,1);H7:=REF(H5,2);H8:=(H5 > H6);
H9:=(((H4 = REF(H4,1)) AND (REF(H4,1) < REF(H4,2))) AND (H5 > REF(H5,2)));
H10:=(((H2 = REF(H |