開多條件:=C>上軌 AND HOLDING=0; 開空條件:=C<下軌 AND HOLDING=0; if C>上軌 AND HOLDING=0, then begin sellshort(1,holding,thisclose),orderqueue; buy(holding=0,ss,thisclose),orderqueue;endif C<下軌 AND HOLDING=0, then begin sell(1,holding,thisclose),orderqueue; buyshort(holding=0,ss,thisclose),orderqueue;end