快:=100*(CLOSE-REF(CLOSE,12))/REF(CLOSE,12);
慢:=MA(快,5);
Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
Q3:=SMA(Q2, 9, 1);
Q4:=SMA(Q3, 3, 1);
长趋势:=3*Q3-2*Q4;
多:=长趋势>=REF(长趋势,1);
持仓:=多 OR (长趋势>REF(长趋势,1) AND 快>=慢);
空:=长趋势<REF(长趋势,1);
A:=MAX(MA(C,60),MA(C,120));
买多:=(多 OR 持仓) AND 快>=REF(快,1) AND NOT(空);
买空A:=( 空 AND 快<REF(快,1)) AND NOT(买多);
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:= (20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;
持多:(C>牛线 OR C>A OR COUNT(买多,5)>=3) AND NOT(买空A) AND 慢>=REF(慢,1);
OK:=REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(Abs(CLOSE-OK),7,1)*100;
RSI2:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100;
鱼:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100;
RSI4:=SMA(鱼,7,1);
趋势A:=MA(((CLOSE-LLV(LOW,48))/(HHV(HIGH,48)-LLV(LOW,48))*50),17)+9;
趋势B:=MA(((CLOSE-LLV(LOW,53))/(HHV(HIGH,53)-LLV(LOW,53))*50),17)+9;
AZ1:=MA(趋势A,7)*1.372;
AZ2:=AZ1*1.0887;
AZ3:=(1.5*(趋势B+RSI4)-(AZ2+AZ1))+12;
鱼网:=IF((crOSS(RSI2,RSI4) OR CROSS(RSI2,AZ3) AND AZ3<38 AND RSI1<51),18,0);
买入:=IF(EXIST(鱼网=18,8)AND 鱼>45 AND 鱼>REF( 鱼,2),1,0);

