以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- [求助]模型编写 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=61876) |
-- 作者:木瓜 -- 发布时间:2014/2/20 20:33:58 -- [求助]模型编写 请教模型编写: 假设 A为多单条件 B为空单条件 请教下面的交易模式表达
如果符合A,开多单 如果不符合A,平多单
如果符合B开空单 如果不符合B,平空单
谢谢!! |
-- 作者:木瓜 -- 发布时间:2014/2/20 21:05:00 -- 补充一下: A为多单条件,只要符合条件A,持有多单 B为空单条件,只要符合条件B,持有空单 |
-- 作者:jinzhe -- 发布时间:2014/2/21 9:25:15 -- if a and holding=0 then buy(1,1,market); if not(a) and holding>0 then sell(1,0,market); if b and holding=0 then buyshort(1,1,market); if not(b) and holding<) then sellshort(1,0,market); |
-- 作者:木瓜 -- 发布时间:2014/2/21 22:17:15 -- 谢谢版主~!!! |