仅供参考
//(1)触发条件,开空1手
if KKcon THEN buyshort(1,1,market);
//(2)开仓后不利>=3个指数点止损
if l > enterprice + 3 then sellshort(1,0,market);
//(3)止赢1:赢利>=8个指数点后回撤>=5个指数点,止赢
if holding<0 and c<=enterprice - 8 then
begin
maxpro:=c;
if c >= maxpro -5 then sellshort(1,0,market);
end
//(4)止赢2:赢利>=15个指数点后回撤>=3个指数点,止赢
if holding<0 and c<=enterprice - 15 then
begin
maxpro:=c;
if c >= maxpro - 3 then sellshort(1,0,market);
end
//(5)止赢3:赢利>=20个指数点后回撤>=2个指数点,止赢
if holding<0 and c<=enterprice - 20 then
begin
maxpro:=c;
if c >= maxpro - 2 then sellshort(1,0,market);
end
//(6)止赢3:赢利>=25个指数点,止赢
if holding<0 and c<=enterprice - 25 then sellshort(1,0,market);
//平所有仓
if time>=145900 then
begin
sellshort(1,0,market);
sell(1,0,market);
end