mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-03 18:43:04 +00:00
@@ -1424,11 +1424,11 @@ class FreqtradeBot(LoggingMixin):
|
||||
# New candle
|
||||
proposed_rate = self.exchange.get_rate(
|
||||
trade.pair, side='entry', is_short=trade.is_short, refresh=True)
|
||||
adjusted_entry_price = strategy_safe_wrapper(self.strategy.adjust_entry_price,
|
||||
default_retval=order_obj.price)(
|
||||
adjusted_entry_price = strategy_safe_wrapper(
|
||||
self.strategy.adjust_entry_price, default_retval=order_obj.safe_placement_price)(
|
||||
trade=trade, order=order_obj, pair=trade.pair,
|
||||
current_time=datetime.now(timezone.utc), proposed_rate=proposed_rate,
|
||||
current_order_rate=order_obj.safe_price, entry_tag=trade.enter_tag,
|
||||
current_order_rate=order_obj.safe_placement_price, entry_tag=trade.enter_tag,
|
||||
side=trade.trade_direction)
|
||||
|
||||
replacing = True
|
||||
@@ -1436,7 +1436,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
if not adjusted_entry_price:
|
||||
replacing = False
|
||||
cancel_reason = constants.CANCEL_REASON['USER_CANCEL']
|
||||
if order_obj.price != adjusted_entry_price:
|
||||
if order_obj.safe_placement_price != adjusted_entry_price:
|
||||
# cancel existing order if new price is supplied or None
|
||||
res = self.handle_cancel_enter(trade, order, order_obj, cancel_reason,
|
||||
replacing=replacing)
|
||||
|
||||
Reference in New Issue
Block a user