以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 收盘前5分钟平掉所有仓位,如何写 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=84071) |
-- 作者:allenzhang -- 发布时间:2015/8/17 11:25:03 -- 收盘前5分钟平掉所有仓位,如何写 请问:收盘前5分钟平掉所有仓位,如何写? 2,如何实现离开盘价30个点止盈,止损(用在沪深300期货上)? |
-- 作者:jinzhe -- 发布时间:2015/8/17 11:30:16 -- 1. if time>=151000 then begin sell(1,0,market); sellshort(1,0,market); end
2. 以开多为例,开空请根据下面编写的自行修改 30点止盈: if holding>0 and h-enterprice>30*mindiff then sell(1,0,market); if holding>0 and enterprice-l>30*mindiff then sell(1,0,market); |