快:=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 快>=慢);
空:=长趋势
买多:(多 OR 持仓) AND 快>=REF(快,1) AND NOT(空);