在阅读代码的时候,发现app/cta_strategy/template下面关于有两个地方注释和代码好像不一致,有哪位大神帮忙解答一下
注释好像要下平多单,但是实际代码是平空单(根据方法名称,平多单好像更合理)
def sell(self, price: float, volume: float, stop: bool = False, lock: bool = False): """ Send sell order to close a long position. """ return self.send_order(Direction.SHORT, Offset.CLOSE, price, volume, stop, lock)
注释好像要下平空单,但是实际代码是平多单(根据方法名称,平空单好像更合理)
def cover(self, price: float, volume: float, stop: bool = False, lock: bool = False): """ Send cover order to close a short position. """ return self.send_order(Direction.LONG, Offset.CLOSE, price, volume, stop, lock)