Fix a case where the amount was not recalculated. Added additional temporary logging.
This commit is contained in:
@@ -160,6 +160,10 @@ class StrategyTestV2(IStrategy):
|
||||
current_rate: float, current_profit: float, **kwargs):
|
||||
|
||||
if current_profit < -0.0075:
|
||||
for order in trade.orders:
|
||||
if order.ft_is_open:
|
||||
return None
|
||||
|
||||
return self.wallets.get_trade_stake_amount(pair, None)
|
||||
|
||||
return None
|
||||
|
@@ -1563,7 +1563,7 @@ def test_recalc_trade_from_orders_ignores_bad_orders(fee):
|
||||
side="buy",
|
||||
price=1,
|
||||
average=2,
|
||||
filled=3,
|
||||
filled=0,
|
||||
remaining=4,
|
||||
cost=5,
|
||||
order_date=arrow.utcnow().shift(hours=-1).datetime,
|
||||
@@ -1590,7 +1590,7 @@ def test_recalc_trade_from_orders_ignores_bad_orders(fee):
|
||||
side="buy",
|
||||
price=1,
|
||||
average=2,
|
||||
filled=3,
|
||||
filled=0,
|
||||
remaining=4,
|
||||
cost=5,
|
||||
order_date=arrow.utcnow().shift(hours=-1).datetime,
|
||||
|
Reference in New Issue
Block a user