Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:不同仓位买入,卖出

1楼
xiaocheng 发表于:2018/6/7 14:34:02
满足条件1,半仓买入
满足条件1和2,全仓买入
请问应该如何编写程序?谢谢
2楼
FireScript 发表于:2018/6/7 14:38:00
 buy(cond1 and not(cond2) and holding=0,50%,market);
 buy(cond1 and cond2 and holding=0,100%,market);
[此贴子已经被作者于2018/6/7 14:38:20编辑过]
3楼
xiaocheng 发表于:2018/6/7 15:16:07
谢谢,那如果满足1买了半仓后,又再满足条件2,要再买半仓呢?
4楼
wenarm 发表于:2018/6/7 15:40:48

if cond1=1  then BEGIN
 buy( holding=0,50%,market);
end

if  cond2=1 then begin
 buy( holding>0,50%,market);
end

 buy(cond1 and cond2 and holding=0,100%,market);

共4 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.00781 s, 3 queries.