Merge pull request #8521 from TheJoeSchr/develop

docs: use helper function `stoploss_from_absolute` in strategy callba…
This commit is contained in:
Matthias 2023-04-19 19:19:58 +02:00 committed by GitHub
commit 4a295d1910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,7 +352,7 @@ class AwesomeStrategy(IStrategy):
# Convert absolute price to percentage relative to current_rate
if stoploss_price < current_rate:
return (stoploss_price / current_rate) - 1
return stoploss_from_absolute(stoploss_price, current_rate, is_short=trade.is_short)
# return maximum stoploss value, keeping current stoploss price unchanged
return 1