x:=c-ref(ma(c,20),11);
lgl:=IF(EMA(C,5)/EMA(EMA(C,9),16)<=0.85 and c/ref(c,1)>0.905 and c/ref(c,1)<1.05 and VOL/CAPITAL*100<5,50,0);
wr1:=-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))+100*x;
wr2:=-100*(HHV(HIGH,50)-CLOSE)/(HHV(HIGH,50)-LLV(LOW,50))+100;
wr3:=-100*(HHV(HIGH,70)-CLOSE)/(HHV(HIGH,70)-LLV(LOW,70))+100*x;
BIAS1:=((CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100+10)*5;
BIAS2:=((CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100+10)*5;
BIAS3:=((CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100+10)*5;
s1:=(wr1+wr2+wr3+bias1+bias2+bias3)/6*x;
s2:=ema(s1,3);
s3:=abs(bias1-bias3);
sx:=(s1+s3)/2;
xc1:=(-1)*(ema(100*(1-WINNER(CLOSE)),1)-50)+50;
ccc:=xc1+sx;
zjz:=IF( lgl>0 and ccc<0,200,0)*x;
lxl:=if(sx<0 and c=llV(c,5) and c/ref(c,1)>0.905 and c/ref(c,1)<1.05 and VOL/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*vol/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,0),colorred,stick,linethick2;
DRAWTEXT(满仓,60, '满仓'),colorred;
半仓:if(((zjz>0 and jbj>0 and SUM(VOL/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(VOL/CAPITAL*100,5)/5<1) or cxc>0) and (lxl<0 or lgl>0)) and vmc<10 ,45,0),ColorC0C0C0,stick;
DRAWTEXT(半仓,45, '半仓'),Colorc0c0c0;
v93:=(((zjz>0 and jbj>0 and SUM(VOL/CAPITAL*100,5)/5<1) or cxc>0) and (lxl<0 or lgl>0)) ;
v90:=((zjz>0 and jbj>0 and SUM(VOL/CAPITAL*100,5)/5<1) or (cxc>0 and ref(c,1)/ref(c,2)>0.902));
买一点:if((v93 or v90),30,0),ColorC080FF;
DRAWTEXT(买一点,30, '买1'),ColorC080FF;
Var2q:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
神奇线:= MA((CLOSE-Var2q)/Var2q,1);
买二点:IF(CROSS(神奇线,0) AND LOW/REF(HIGH,1)<1.012 and ((c-ref(c,2))/c)>0.06,30,0),Colorff00ff;
DRAWTEXT(买二点,30, '买2'),ColorFF00ff;
yy:=SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,18,1),12,1);
yt:=SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,12,1);
st:=if(cross(yt,yy),30,0);
Var5pt:=(HIGH+LOW+CLOSE)/3;
Var6pt:=(Var5pt-MA(Var5pt,14))/(0.015*AVEDEV(Var5pt,14));
Var7pt:=(Var5pt-MA(Var5pt,85))/(0.015*AVEDEV(Var5pt,85));
sa:=IF(Var7pt>=200 AND Var6pt>=150,10,0);
Var3qq:=REF(CLOSE,1);
Var4qq:=SMA(MAX(CLOSE-Var3qq,0),6,1)/SMA(ABS(CLOSE-Var3qq),6,1)*100;
sm:=if(CROSS(80,Var4qq),30,0);
卖点:if((sm and (sa or st)),30,0),Color0080FF;
DRAWTEXT(卖点,30, '卖'),color00ff00;