From 6892c08e9b9091ab68a89ea92ff654316813b7a0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 19 Dec 2020 13:18:06 +0100 Subject: [PATCH] Improve docstring --- freqtrade/strategy/interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 021674bb9..9378f1996 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -258,12 +258,14 @@ class IStrategy(ABC): def stoploss_value(self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs) -> float: """ - Define custom stoploss logic + Custom stoploss logic, returning the new distance relative to current_rate (as ratio). + e.g. returning -0.05 would create a stoploss 5% below current_rate. The custom stoploss can never be below self.stoploss, which serves as a hard maximum loss. For full documentation please go to https://www.freqtrade.io/en/latest/strategy-advanced/ When not implemented by a strategy, returns the initial stoploss value + Only called when custom_stoploss is set to True. :param pair: Pair that's about to be sold. :param trade: trade object.