以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  buy,buyshort这些函数会不会在开仓前先把反向的仓位平掉呢?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=49143)

--  作者:wilsonax
--  发布时间:2013/3/3 22:55:42
--  buy,buyshort这些函数会不会在开仓前先把反向的仓位平掉呢?
buy,buyshort这些函数会不会在开仓前先把反向的仓位平掉呢?
--  作者:王锋
--  发布时间:2013/3/3 23:50:06
--  
不会的
--  作者:jinzhe
--  发布时间:2013/3/4 9:22:04
--  

需要先写平仓语句,然后在写反手开仓语句

比如

if 条件1 then begin

sellshort;

buy;

end

 

if  条件2 then begin

sell;

buyshort;

end