跨期套利,多图层交易图标上无信号, 确单腿上发出了指令的问题
多图层,第0图层是11月份合约,第1图层是1月份合约。第0图层上的多头合约被平仓了(帐户透视了有委托成交纪录),第1图层上的没有平仓, 检查图标,都没有交易信号,不知是什么原因?逻辑: 如果不同月份的合约差价扩大到一个阈值,就同时开仓,如果价格缩小到一定值,就全部平仓代码:ParamsInteger bkLen(240);Integer fixLots(10);Numeric maxDist(30);Numeric minDist(30);Integer offset(1);VarsInteger splitdot(1);Series<Integer> bsLock(0);EventsOnBar(ArrayRef<Integer> indexs){Commentary(\"status=nmAnt23v0829tb2008\");splitdot = offset*MinMove()*PriceScale();If(Data[1].O-Data[0].O < minDist) {}// newIf(Data[1].O-Data[0].O > maxDist&& bsLock!=1) {Commentary(\"exit = 0\");Data[0].BuyToCover(0,Data[0].O+splitdot);Data[1].Sell(0,Data[1].O-splitdot);Data[0].Buy(fixLots,Data[0].O+splitdot);Data[1].SellShort(fixLots,Data[1].O-splitdot);bsLock = 1;}If(Data[1].O-Data[0].O < minDist&& bsLock!=-1) {Commentary(\"exit = 0\");Data[1].BuyToCover(0,Data[1].O+splitdot);Data[0].Sell(0,Data[0].O-splitdot);Data[1].Buy(fixLots,Data[1].O+splitdot);Data[0].SellShort(fixLots,Data[0].O-splitdot);bsLock = -1;}}请帮忙看下多图层的这种触发指令的方式是否可靠稳定?