以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 这样编写有问题吗?请改正 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=47909) |
-- 作者:300qh -- 发布时间:2013/1/19 11:12:35 -- 这样编写有问题吗?请改正
if 买1止损条件 and holding>0 then begin if 买1止盈条件 and holding>0 then BEGIN if 买1移止条件 and holding>0 then BEGIN
if 买2止损条件 and holding>0 then begin if 买2止盈条件 and holding>0 then BEGIN if 买2移止条件 and holding>0 then BEGIN
卖1开空条件:********; if 卖1止损条件 and holding<0 then begin if 卖1止盈条件 and holding<0 then BEGIN if 卖1移止条件 and holding<0 then BEGIN
卖2开空条件:********; if 卖2止损条件 and holding<0 then begin if 卖2止盈条件 and holding<0 then BEGIN if 卖2移止条件 and holding<0 then BEGIN |
-- 作者:jinzhe -- 发布时间:2013/1/21 9:11:11 -- 把持仓判断条件写在下单语句中比如 sellshort(holding<0,) buy(holding=0,) |
-- 作者:300qh -- 发布时间:2013/1/21 20:46:48 -- 以上这样,如果有很多组买卖条件,只要不断增加就可以了是吗? 持仓判断写在开平仓函数里,与直接写在外面,有什么区别?请指点一下 |
-- 作者:jinzhe -- 发布时间:2013/1/22 8:55:28 -- 上面的语法都没问题,平仓反手把持仓判断写进下单语句而不是外面是怕下单时平仓判断有误 |
-- 作者:300qh -- 发布时间:2013/1/22 18:38:28 -- 谢谢大师傅 |