diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index f9ac3467c..c29b8b57b 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1474,7 +1474,7 @@ class Exchange: price_side = price_map[(side, 'short' if is_short else 'long', price_side)] return price_side - def get_rate(self, pair: str, refresh: bool, # noqa: max-complexity: 13 + def get_rate(self, pair: str, refresh: bool, side: EntryExit, is_short: bool, order_book: Optional[dict] = None, ticker: Optional[dict] = None) -> float: """ diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 383204be3..080cce999 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -542,7 +542,8 @@ class FreqtradeBot(LoggingMixin): if stake_amount is not None and stake_amount > 0.0: # We should increase our position - self.execute_entry(trade.pair, stake_amount, trade=trade, is_short=trade.is_short) + self.execute_entry(trade.pair, stake_amount, price=current_entry_rate, + trade=trade, is_short=trade.is_short) if stake_amount is not None and stake_amount < 0.0: # We should decrease our position diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 790d41c8e..5da100162 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -578,7 +578,7 @@ class Backtesting: pair=trade.pair, trade=trade, current_time=exit_candle_time, proposed_rate=close_rate, current_profit=current_profit, - exit_tag=exit_.exit_reason) + exit_tag=exit_reason) # We can't place orders lower than current low. # freqtrade does not support this in live, and the order would fill immediately if trade.is_short: