fix bug
This commit is contained in:
@@ -137,7 +137,7 @@ def handle_profit(
|
||||
volume = position.can_use_volume - position.can_use_volume % 100
|
||||
if volume <= 0:
|
||||
return TradeDecision(False, "无可用整手持仓")
|
||||
order_id = runtime.orders.new_order_id("SELL")
|
||||
order_id = runtime.orders.new_order_id("TREN","SELL")
|
||||
request = PlaceOrderRequest(
|
||||
op=OP_SELL,
|
||||
code=position.stock_code,
|
||||
@@ -178,7 +178,7 @@ def handle_loss(
|
||||
if volume <= 0 or amount > available:
|
||||
return TradeDecision(False, "本轮可用资金不足")
|
||||
|
||||
order_id = runtime.orders.new_order_id("BUY")
|
||||
order_id = runtime.orders.new_order_id("TREN","BUY")
|
||||
request = PlaceOrderRequest(
|
||||
op=OP_BUY,
|
||||
code=position.stock_code,
|
||||
|
||||
Reference in New Issue
Block a user