From 6f401a9e150be8f569396e129fcf698182488a1f Mon Sep 17 00:00:00 2001 From: Joe Schr <8218910+TheJoeSchr@users.noreply.github.com> Date: Tue, 18 Apr 2023 11:10:46 +0200 Subject: [PATCH] docs: use helper function `stoploss_from_absolute` in strategy callbacks "absolute" example --- docs/strategy-callbacks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/strategy-callbacks.md b/docs/strategy-callbacks.md index 329908527..070eb6d48 100644 --- a/docs/strategy-callbacks.md +++ b/docs/strategy-callbacks.md @@ -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