From 12560e983c8823470c0e94fa17376999b8fd4e4e Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 7 Nov 2024 19:57:41 +0100 Subject: [PATCH] docs: Add note about custom-stoploss exit reasons --- docs/strategy-callbacks.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/strategy-callbacks.md b/docs/strategy-callbacks.md index a158a80ff..78c6c7380 100644 --- a/docs/strategy-callbacks.md +++ b/docs/strategy-callbacks.md @@ -165,7 +165,8 @@ Called for open trade every iteration (roughly every 5 seconds) until a trade is The usage of the custom stoploss method must be enabled by setting `use_custom_stoploss=True` on the strategy object. -The stoploss price can only ever move upwards - if the stoploss value returned from `custom_stoploss` would result in a lower stoploss price than was previously set, it will be ignored. The traditional `stoploss` value serves as an absolute lower level and will be instated as the initial stoploss (before this method is called for the first time for a trade), and is still mandatory. +The stoploss price can only ever move upwards - if the stoploss value returned from `custom_stoploss` would result in a lower stoploss price than was previously set, it will be ignored. The traditional `stoploss` value serves as an absolute lower level and will be instated as the initial stoploss (before this method is called for the first time for a trade), and is still mandatory. +As custom stoploss acts as regular, changing stoploss, it will behave similar to `trailing_stop` - and trades exiting due to this will have the exit_reason of `"trailing_stop_loss"`. The method must return a stoploss value (float / number) as a percentage of the current price. E.g. If the `current_rate` is 200 USD, then returning `0.02` will set the stoploss price 2% lower, at 196 USD.