以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://weistock.com/bbs/list.asp?boardid=2)
----  编写高低杠杆  (http://weistock.com/bbs/dispbbs.asp?boardid=2&id=65550)

--  作者:寒茌
--  发布时间:2014/5/28 10:11:46
--  编写高低杠杆
请问怎么表达 如果满足condition1 开3手多头 满足condition2开1手多头
--  作者:yukizzc
--  发布时间:2014/5/28 10:14:19
--  

buy(condition1 and holding=0,3,market);

buy(condition2 and holidng=0,1,market);   //平仓语句自己添加下

[此贴子已经被作者于2014/5/28 10:17:00编辑过]

--  作者:寒茌
--  发布时间:2014/5/28 10:38:37
--  

如果我这样表达,金字塔会认为错误吗?



sell(condition3 and holding=0,3, market);

sell(condition4 and holding=0,1,market);


buy(condition1 and holding=0,3,market);

buy(condition2 and holidng=0,1,market); 



sellshort(condition5 and holding=0,3, market);

sellshort(condition6 and holding=0,1,market);


buyshort(condition7 and holding=0,3,market);

buyshort(condition8 and holidng=0,1,market); 



--  作者:RogarZ
--  发布时间:2014/5/28 10:56:40
--  

不明白你的意思

 

PS:代码问题 请发至 公式模型问题提交区   谢谢配合