反手只开仓,不平仓

OnBar(ArrayRef<Integer> indexs)

{

A_GetPosition(mypos);

longvolume=mypos.longCurrentVolume;//获取多头持仓

shortvolume=mypos.shortCurrentVolume; //获取空头持仓

if (longvolume==1 and shortvolume==0 and low<=averagclose)

{   Array<Integer> orders;

   Bool ret = A_SellShort(Symbol, 1, Low_limit, orders, "", "");

}

}

A_Buy,A_Sellshort 不能起到反手的作用吗?为啥总是只开仓,不平仓。记得回测模型里头Sellshort和buy函数是有平仓反手的作用。


平仓反手策略为什么只平仓不反手
需求:模式策略可平仓位不足时,不要反手开仓
只设置开仓和止损,不设置止盈
平仓延迟反手
反手信号,平仓成交后再发开仓单案例
我可以开一个策略单元只负责开仓,一个策略单元只负责平仓吗?
设置了SetTradeSide(1)为什么只平仓不开仓
收盘平仓不执行
反手策略
只发信号,不委托发单

那是不是得先写平仓,再开仓,分两条语句来写?

是的

感谢😀

不能

图表是自动反手,但是a函数不行