We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73b4273 commit ad25636Copy full SHA for ad25636
freqtrade/exchange/exchange.py
@@ -1254,13 +1254,14 @@ def _dry_is_price_crossed(
1254
limit: float,
1255
orderbook: OrderBook | None = None,
1256
offset: float = 0.0,
1257
+ is_stop: bool = False,
1258
) -> bool:
1259
if not self.exchange_has("fetchL2OrderBook"):
1260
return True
1261
if not orderbook:
1262
orderbook = self.fetch_l2_order_book(pair, 1)
1263
try:
- if side == "buy":
1264
+ if (side == "buy" and not is_stop) or (side == "sell" and is_stop):
1265
price = orderbook["asks"][0][0]
1266
if limit * (1 - offset) >= price:
1267
0 commit comments