fix: don't bracked stoploss to 1

it's problematic for short trades - especially if they move past the 100% profit  margin - as price starts to trail.
This commit is contained in:
Matthias
2026-02-11 07:15:14 +01:00
parent 12c3698480
commit 646c091e02

View File

@@ -182,5 +182,4 @@ def stoploss_from_absolute(
# negative stoploss values indicate the requested stop price is higher/lower
# (long/short) than the current price
# shorts can yield stoploss values higher than 1, so limit that as well
return max(min(stoploss, 1.0), 0.0) * leverage
return max(stoploss, 0.0) * leverage