Improve compatibility

This commit is contained in:
Matthias
2022-03-24 20:53:22 +01:00
parent ec63cfd656
commit e894f620c2
9 changed files with 16 additions and 11 deletions

View File

@@ -1416,7 +1416,7 @@ class FreqtradeBot(LoggingMixin):
trade.open_order_id = order['id']
trade.sell_order_status = ''
trade.close_rate_requested = limit
trade.exit_reason = exit_tag or exit_check.sell_reason
trade.exit_reason = exit_tag or exit_check.exit_reason
# Lock pair for one candle to prevent immediate re-trading
self.strategy.lock_pair(trade.pair, datetime.now(timezone.utc),

View File

@@ -590,7 +590,7 @@ def text_table_exit_reason(exit_reason_stats: List[Dict[str, Any]], stake_curren
]
output = [[
t.get('exit_reason', t['sell_reason']), t['trades'],
t.get('exit_reason', t.get('sell_reason')), t['trades'],
_generate_wins_draws_losses(t['wins'], t['draws'], t['losses']),
t['profit_mean_pct'], t['profit_sum_pct'],
round_coin_value(t['profit_total_abs'], stake_currency, False),

View File

@@ -953,7 +953,6 @@ class LocalTrade():
""" DEPRECATED! Please use exit_reason instead."""
return self.exit_reason
@staticmethod
def get_trades_proxy(*, pair: str = None, is_open: bool = None,
open_date: datetime = None, close_date: datetime = None,

View File

@@ -240,7 +240,7 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots:
trades['desc'] = trades.apply(
lambda row: f"{row['profit_ratio']:.2%}, " +
(f"{row['enter_tag']}, " if row['enter_tag'] is not None else "") +
f"{row['sell_reason']}, " +
f"{row['exit_reason']}, " +
f"{row['trade_duration']} min",
axis=1)
trade_buys = go.Scatter(