if H>FstStop And C>O then //初始止损
平空Fst:sellshort(1,holding,Thisclose);
if H>MinL+5*EnterStop And C>O then//0.05*MinL
最大回撤平空:sellshort(1,holding,Thisclose);
if ENTERBARS>BARSTAGE And ROC-DayL>=0.03*ROC And H>MinL+0.02*MinL And C>O then
//当日低点超3%回撤2%出场
空止盈FLLstop:sellshort(1,holding,Thisclose);
if kd And H>ENTERPRICE-0.8*(ENTERPRICE-MinL) And H>MinL+0.02*MinL And C>O then begin
平空kd1:sellshort(1,holding,Thisclose);
if kd2 then begin
开多3:buy(1,ss,Thisclose);
FstStop:=ENTERPRICE-EnterStop;
end