以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 请教代码问题 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=51716) |
-- 作者:just1 -- 发布时间:2013/5/6 13:26:03 -- 请教代码问题 So.J 13:23:43
请问如何编写 A=1时开多 B=1时开空 下单后20个点止盈 5个点止损 收盘自动平仓 |
-- 作者:jinzhe -- 发布时间:2013/5/6 13:46:39 -- if a=1 and time<145500 then 开多语句; if b=1 and time<145500 then 开空语句; if holding>0 and c-enterprice>20*mindiff then 多头止盈语句; if holding>0 and enterprice-c>5*mindiff then 多头止损语句; if holding<0 and enterprice-c>20*mindiff then 空头止盈语句; if holding<0 and c-enterprice>5*mindiff then 空头止盈语句; |