以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  再次请管理员帮忙  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=184949)

--  作者:wyhyty
--  发布时间:2021/3/30 9:21:59
--  再次请管理员帮忙


buy(1 and holding=0,1,market);
sell(1 and holding>0,holding,market);

我用上面的语句,在K线图上可以出现买卖信号,但是用下面的就没有信号了。请问如何才能卖开和平空?

buyshort(1 and holding=0,1,market);
sellshort(1 and holding>0,holding,market);


--  作者:FireScript
--  发布时间:2021/3/30 9:27:50
--  
 sellshort(1 and holding<0,holding,market);

空仓仓位时候 holding是负数。

--  作者:wyhyty
--  发布时间:2021/3/30 9:29:18
--  
好的,我试试。感谢。
--  作者:wyhyty
--  发布时间:2021/3/30 9:30:47
--  
还真是这样的。万分感谢!!