以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://222.73.7.161/bbs/index.asp) -- 公式模型编写问题提交 (http://222.73.7.161/bbs/list.asp?boardid=4) ---- 简单模型编写 (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=155590) |
-- 作者:longwuchi -- 发布时间:2017/6/30 13:52:58 -- 简单模型编写 3分钟图 早上开盘第一根k线为阳线,限价做多1手 为阴线,限价做空1手 多单止损10点 止盈5点 空单止损10点,止盈5点 尾盘清仓; 咋写,最好 能测试 能直接模拟用 |
-- 作者:banzhuan -- 发布时间:2017/6/30 14:36:52 -- if c>o and time<=093300 then buy(1,1,limit,c); if c<o and time<=093300 then buyshort(1,1,limit,c); sell((c-enterprice)>=5 and holding>0,1,market); sell((c-enterprice)<=10 and holding>0,1,market); sellshort((enterprice-c)>=5 and holding<0,1,market); sellshort((c-enterprice)<=10 and holding>0,1,market); if time>=145900 then begin sell(holding>0,1,market); sellshort(holding<0,1,market); end
|