N:= 3;
VAR1:= REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:= SMA(Abs(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:= EMA(VAR2,10);
VAR4:= LLV(LOW,33);
VAR5:= EMA(IF(LOW<=VAR4,VAR3,0),5);
VAR6:= REF(CLOSE,1);
VAR7:= SMA(MAX(CLOSE-VAR6,0),6,1)/SMA(ABS(CLOSE-VAR6),6,1)*100;
VAR8:= LLV(LOW,5)=LLV(LOW,45) AND CLOSE>=OPEN*1.04;
VAR9:= CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;
VAR10:= VAR8 AND VAR9;
VAR11:= (2*CLOSE+HIGH+LOW)/4;
VAR12:= LLV(LOW,13);
VAR13:= HHV(HIGH,13);
VAR14:= LLV(LOW,1)=LLV(LOW,35) AND CLOSE>=OPEN*1.04;
龙:= VAR10;
买4:= VAR14;
AA1:= AMOUNT/vol;
BB1:= LOW<AA1*0.9;
CC1:= (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>1.2;
DD1:= LOW<MA(CLOSE,5)*0.921;
EE1:= VOL<MA(VOL,5)*1.5;
FF1:= BB1 AND CC1 AND DD1 AND EE1;
买3:= FILTER(FF1,3) AND DATE<=10280530;
二十天最低跌幅:= HHV(CLOSE,20)/LLV(CLOSE,20);
RSV:= (CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:= SMA(RSV,3,1);
D:= SMA(K,3,1);
J:= 3*K-2*D;
X:= LLV(J,2)=LLV(J,8);
买1:= crOSS(J,REF(J+0.01,1)) AND X AND J<20 AND 二十天最低跌幅>=1.3;
长期底部:= LLV(HIGH,30);
上:= SMA(LOW,5,2)*0.96;
短期底部:= LLV(HIGH,30)*0.93;
选底:= FILTER(LOW<=上 AND HIGH>=短期底部 AND CLOSE>=长期底部 AND CLOSE/OPEN>1.03,3);
选买:= FILTER(买3 OR 选底,3) AND COUNT(买1+买4+龙,3)>0 ;
稳赚10%买:选买;