fix cannot buy for simulation trader
This commit is contained in:
parent
28de80a779
commit
58c8bafe45
@ -53,7 +53,7 @@ class SimulationTrader(BaseTrader):
|
||||
# 更新持仓管理器
|
||||
position_manager = self.get_position_manager(strategy_name)
|
||||
position_manager.update_position(
|
||||
strategy_name, code, ORDER_DIRECTION_BUY, amount
|
||||
code, ORDER_DIRECTION_BUY, amount
|
||||
)
|
||||
order_id = random.randint(1, 999999) # 使用随机函数生成小于1000000的随机整数
|
||||
position_manager.add_pending_order(
|
||||
|
Loading…
x
Reference in New Issue
Block a user