VAR2:=MA(CLOSE,10);
VAR3:=MA(CLOSE,20);
VAR4:=MA(CLOSE,20);
VAR5:=VAR4+0.3*STD(CLOSE,20);
VAR6:=VAR4-2*STD(CLOSE,20);
VAR7:=BARSLAST(CLOSE/REF(CLOSE,1)>=1.095 AND CLOSE=HIGH);
VAR8:=REF(VAR1,3)>REF(VAR2,3) AND REF(VAR2,3)>REF(VAR3,3) AND REF(VAR1,2)>REF(VAR2,2) AND REF(VAR2,2)>REF(VAR3,2) AND REF(VAR1,1)>REF(VAR2,1) AND REF(VAR2,1)>REF(VAR3,1) AND VAR1>VAR2 AND VAR2>VAR3;
VAR9:=REF(VAR1,3)>REF(VAR2,3) AND REF(VAR1,2)>REF(VAR2,2) AND REF(VAR2,2)< REF(VAR3,2) AND REF(VAR1,1)>REF(VAR2,1) AND REF(VAR2,1)>REF(VAR3,1) AND VAR1>VAR2 AND VAR2>VAR3;
VAR10:=REF(CLOSE,1)/REF(CLOSE,2)>1.105 AND CLOSE>OPEN AND CLOSE/REF(CLOSE,1)< 1.19 AND HIGH/CLOSE< 1.1 AND CLOSE/REF(CLOSE,1)>1 AND NOT(VOL>0.8*REF(VOL,1) AND LOW/OPEN>0.96) AND VOL< 2*REF(VOL,2);
VAR11:=REF(CLOSE,1)/REF(CLOSE,2)>1.105 AND CLOSE>OPEN AND CLOSE/REF(CLOSE,1)< 1.19 AND HIGH/CLOSE< 1.1 AND CLOSE/REF(CLOSE,1)< 1 AND VOL< REF(VOL,1);
VAR12:=VAR10 OR VAR11;
VAR13:=REF(VAR12,1) AND CLOSE/REF(CLOSE,1)< 1.02;
VAR14:=VAR13 OR (VAR12 AND REF(VAR12,1));
VAR15:=DYNAINFO(37)*100;
VAR16:=REF(VAR15,1);
VAR17:=VAR13 OR VAR12;
VAR18:=REF(CLOSE,1)/REF(CLOSE,2)>1.07 AND CLOSE/REF(CLOSE,1)< 1.19 AND HIGH/CLOSE< 1.1 AND CLOSE/REF(CLOSE,1)>1 AND NOT(VOL>0.8*REF(VOL,1) AND LOW/OPEN>0.96) AND VOL< 2*REF(VOL,2);
VAR19:=REF(CLOSE,1)/REF(CLOSE,2)>1.07 AND CLOSE/REF(CLOSE,1)< 1.19 AND HIGH/CLOSE< 1.1 AND CLOSE/REF(CLOSE,1)< 1 AND VOL< REF(VOL,1);
VAR20:=VAR18 OR VAR19;
VAR21:=REF(VAR20,1) AND CLOSE/REF(CLOSE,1)< 1.02;
VAR22:=VAR21 OR (VAR20 AND REF(VAR20,1));
VAR23:=VAR21 OR VAR20 AND (CLOSE>OPEN AND OPEN/LOW< 1.05 );
VAR24:=HIGH>=HHV(HIGH,15);
VAR25:=1;
VAR26:=BARSLAST(CLOSE/REF(CLOSE,1)>1.19 AND CLOSE=HIGH);
VAR27:=1;
VAR28:=NOT(REF(CLOSE=HIGH,2) AND REF(CLOSE>OPEN AND HIGH/REF(CLOSE,1)>1.05,1));
VAR29:=NOT(OPEN>REF(CLOSE,1) AND CLOSE< OPEN) AND (CLOSE< OPEN AND CLOSE/LOW< 1.04 OR CLOSE>OPEN) AND VAR28 AND COUNT(OPEN=HIGH,3)< 1 AND VAR26< 5 AND CLOSE/REF(CLOSE,1)< 1 AND VOL< REF(VOL,1) AND NOT(COUNT(OPEN>HHV(CLOSE,5),5)>=1) AND HIGH/OPEN>1.003;
VAR30:=VAR23 OR VAR29 OR VAR17;
尾盘出击:VAR23 OR VAR29 OR VAR17 AND VAR25 AND COUNT(OPEN/REF(CLOSE,1)>1.04,3)< 1 AND NOT(REF(CLOSE,1)/REF(CLOSE,2)>1.195 AND REF(CLOSE=HIGH,1) AND HIGH/REF(CLOSE,1)>1.195) AND NOT(REF(CLOSE=LOW,1) AND REF(CLOSE,1)/REF(CLOSE,2)< 0.94 AND CLOSE/REF(CLOSE,1)< 1.01) AND COUNT(CLOSE/REF(CLOSE,1)< 0.805 AND CLOSE=LOW,8)< 1 AND NOT(COUNT(CLOSE/REF(CLOSE,1)>1.195 AND CLOSE=HIGH,10)>=3 AND REF(CLOSE/REF(CLOSE,1)>1.195 AND CLOSE=HIGH AND HIGH>=HHV(HIGH,50),1)) ;
尾盘出击打分:(VAR1-VAR2)/VAR2*500+(VAR2-VAR3)/VAR3*300+IF(LOW< VAR2,(-100),0),NODRAW;
买入:=REF(C,BARSLAST(尾盘出击)),COLORYELLOW,NODRAW;
最高:=REF(H,BARSLAST(尾盘出击)-1),COLORFF00FF,NODRAW;
结果:=((最高-买入)/买入)*100,COLORRED,NODRAW;
STICKLINE(REF(尾盘出击=1,1) ,0,0.50,2,0),COLORGREEN;
STICKLINE(REF(尾盘出击=1,1) AND 最高/买入>=1.01,0,0.50,2,0),COLORRED;
DRAWICON(REF(尾盘出击=1,1) AND 结果>=1,0.68,5);
DRAWICON(REF(尾盘出击=1,1) AND 结果< 1,0.68,4);
DRAWNUMBER(REF(尾盘出击,1),0.85,结果),COLORYELLOW;
DRAWTEXT(REF(尾盘出击,1),0.78,' %'),COLORYELLOW;