lxl:=if(sx<0 and c=llv(c,5) and c/ref(c,1)>0.905 and c/ref(c,1)<1.05 and v/capital*100<5,-50,0);
jbj:=if(ccc<0 and lxl=-50,100,0)*x;
ma3:=ma(c,3);
c0:=ref(c,2)*0.865;
c1:=ref(c,13)*0.772;
bot:=min(c0,c1);
hsl:=100*v/capital*x;
ma13:=ma(c,13)*x;
cxc:=if((c-bot)/c<3/100 and sum(hsl,5)/5<1.8,1,0);
vmc:=if(cxc>0 and (lxl<0 or lgl>0),10,0);
满仓:if(vmc>0,60,中期大底),Color0000FF;
drawtext(满仓>=60,59,'满仓'),Color0000FF;
半仓:if(zjz>0 and jbj>0 and sum(v/capital*100,5)/5<1 or cxc>0 and ref(c,1)/ref(c,2)>0.902 or (zjz>0 and jbj>0 and sum(v/capital*100,5)/5<1 or cxc>0) and (lxl<0 or lgl>0) and vmc<10,50,中期大底),colorcc99ff;
drawtext(半仓>=50,49,'半仓'),colorcc99ff;
b0:=ma(c,3);
b01:=ma(c,4);
b1:=(h+l+c)/3;
b2:=hhv(b1,15);
b3:=llv(b1,15);
b4:=b2-b3;
b5:ma((b1-b3)/b4,2)*100,Color000080;
b6:=hhv(b1,4*15);
b7:=llv(b1,4*15);
b8:=b6-b7;
b9:ma((b1-b7)/b8,2)*100,ColorFFCD00;
ba:=hhv(b1,16*15);
bb:=llv(b1,16*15);
bc:=ba-bb;
bd:ma((b1-bb)/bc,2)*100,ColorFFEEFF;
顶线:98,ColorFFFFFF;
底线:1,ColorFFFF00;
stickline(cross(b5,底线) and b0-ref(b0,1)>0 and j-ref(j,1)>0 and c>=o,中期大底,50,2,0),Color0000FF;
drawicon(cross(b5,底线) and b0-ref(b0,1)>0 and j-ref(j,1)>0 and c>=o,50,1);
drawtext(cross(b5,底线) and b0-ref(b0,1)>0 and j-ref(j,1)>0 and c>=o,65,'开花一'),colorcc99ff;
stickline(cross(b5,底线) and cross(b9,底线) and b01-ref(b01,1)>0,中期大底,64,2,0),Color0000FF;
drawicon(cross(b5,底线) and cross(b9,底线) and b01-ref(b01,1)>0,64,1);
drawtext(cross(b5,底线) and cross(b9,底线) and b01-ref(b01,1)>0,75,'开花二'),ColorFF00FF;
drawtext(cross(98,b5) and c
stickline(cross(bd,1) and 中-ref(中,1)>0 and b5-ref(b5,2)>0,1,80,3,0);
drawicon(cross(bd,1) and 中-ref(中,1)>0 and b5-ref(b5,2)>0,80,1);
drawtext(cross(bd,1) and 中-ref(中,1)>0 and b5-ref(b5,2)>0,73,'开花三'),color00ffff;
stickline(cross(j,aa) and a2>=a3 and 中-ref(中,1)>0 and c>=o and a3>=a4,中期大底,60,2,0),colorffffff;
drawtext(cross(j,aa) and a2>=a3 and 中-ref(中,1)>0 and c>=o and a3>=a4,60,'●买'),Color00FFFF;
均线:=ma(c,5);
drawtext(cross(b5,a2)>0 and 均线-ref(均线,1)>0,98,'★关注'),color0000ff;
varw2:=(c-ma(c,6))/ma(c,6)*100 and 中-ref(中,1)>0;
varw3:=(c-ma(c,12))/ma(c,12)*100 and 中-ref(中,1)>0;