
等级: 专业版
- 注册:
- 2023-2-16
- 曾用名:
|

楼主 |
发表于 2023-7-21 10:15
|
显示全部楼层
我所有的收停盘公式如下:
错在哪里呢?
//5.4 收停盘平仓
// 10:15分前平仓
if 当前时间>= 101450 and 当前时间<= 101459 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
END
// 11:30分前平仓
if 当前时间>= 112950 and 当前时间<= 112959 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
end
// 15:00分前平仓
if 当前时间>= 145950 and 当前时间<= 145959 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
END
// 15:15分前平仓
if 当前时间>= 151450 and 当前时间<= 151459 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
END
// 23:00分前平仓
if 当前时间>= 225950 and 当前时间<= 225959 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
END
// 01:00分前平仓
if 当前时间>= 005950 and 当前时间<= 005959 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
END
// 02:30分前平仓
if 当前时间>= 022950 and 当前时间<= 022959 and 买持仓量>0 or 卖持仓量>0 then begin
tsell(1,买持仓量,mkt,0,0,当前帐户,品种名称);
tsellshort(1,卖持仓量,mkt,0,0,当前帐户,品种名称);
END
|
|