Skip to content

Commit d73a173

Browse files
committed
fix: avoid warning for dry stoploss orders
1 parent 110b50a commit d73a173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ def create_dry_run_order(
11561156
orderbook: OrderBook | None = None
11571157
if self.exchange_has("fetchL2OrderBook"):
11581158
orderbook = self.fetch_l2_order_book(pair, 20)
1159-
if ordertype == "limit" and orderbook:
1159+
if not stop_loss and ordertype == "limit" and orderbook:
11601160
# Allow a 1% price difference
11611161
allowed_diff = 0.01
11621162
if self._dry_is_price_crossed(pair, side, rate, orderbook, allowed_diff):

0 commit comments

Comments
 (0)