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);
这样可以吗,开多平仓和开空平仓能否正常
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编辑过]