以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  金字塔软件问题提交  (http://222.73.7.161/bbs/list.asp?boardid=2)
----  双向交易  (http://222.73.7.161/bbs/dispbbs.asp?boardid=2&id=170865)

--  作者:sdlgannY
--  发布时间:2019/7/5 17:09:52
--  双向交易
ma5:ma(c,5);
kccd:cross(ma5,c);
pccd:cross(c,ma5);

buyshort(holding=0 and kccd,1,market);
sellshort(holding<0 and pccd,holding,market);

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

这样可以吗,开多平仓和开空平仓能否正常

--  作者:banzhuan
--  发布时间:2019/7/5 17:14:23
--  
ma5:ma(c,5);
kccd:cross(ma5,c);
pccd:cross(c,ma5);

sellshort(holding<0 and pccd,holding,market);
buy(holding=0 and pccd,1,market);
sell(holding>0 and kccd,holding,market);
buyshort(holding=0 and kccd,1,market);

在图表交易中,建议使用 平空 〉 开多  平多 〉 开空的顺序
[此贴子已经被作者于2019/7/5 17:15:27编辑过]