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;
FS:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100;
RSI4:=SMA(FS,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;
A1:=MA(趋势A,7)*1.372;
A2:=A1*1.0887;
A3:=(1.5*(趋势B+RSI4)-(A2+A1))+12;
涨:=IF((crOSS(RSI2,RSI4) OR CROSS(RSI2,A3) AND A3<38 AND RSI1<51),48,38);
买进A:=IF(EXIST(涨=48,8)AND FS>47 AND FS>REF( FS,2),1,0);
买进:买进A AND COUNT(买进A,5)=1;
快:=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);
买多:(多 OR 持仓) AND 快>=REF(快,1) AND NOT(空);

