下面代码逻辑里面的SellShort,Buy价格是否头偷价行为?
下面代码逻辑里面的SellShort,Buy价格是否头偷价行为,请问是否需要优化?如何优化?Series<Numeric> openm ; Series<Numeric> closem ; Series<Bool> longCond; Series<Bool> sellCond;OnBar(ArrayRef<Integer> indexs) { openm = 变换以后得的开盘价 closem = 变换以后得的收盘价 longCond = openm和 closem计算以后得做多条件 sellCond = openm和 closem计算以后得做空条件 if (MarketPosition != -1 && longCond[1]) { SellShort(lots, Max(openm, open)); } if (MarketPosition != 1 && sellCond[1]) { Buy(lots, Min(openm, open)); } }