wondertrader/wtpy

WtEngine=>add_sel_strategy=>create_sel_context传参错误

olawonzhu opened this issue · 1 comments

def add_sel_strategy(self, strategy:BaseSelStrategy, date:int, time:int, period:str, slippage:int = 0):
    #if isinstance(strategy, EtSelStrategy):
    #    strategy.setEngine(self)
    id = self.__wrapper__.create_sel_context(strategy.name(), date, time, period, slippage)
    self.__sel_ctxs__[id] = SelContext(id, strategy, self.__wrapper__, self)

slippage作为第五个参数传入,但是WtWrapper里定义的是第七个

def create_sel_context(self, name:str, date:int, time:int, period:str, trdtpl:str = 'CHINA', session:str = "TRADING", slippage:int = 0) -> int:

dev已修复,正式版>=0.9.8