From e5840abaf9f77ecb47df29ca352f07ec0e4ae032 Mon Sep 17 00:00:00 2001 From: hoeckxer Date: Thu, 31 Dec 2020 21:05:47 +0100 Subject: [PATCH] Added imports to documentation for clarification when using custom stoploss Signed-off-by: hoeckxer --- docs/strategy-advanced.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/strategy-advanced.md b/docs/strategy-advanced.md index 519a9ac62..7876106be 100644 --- a/docs/strategy-advanced.md +++ b/docs/strategy-advanced.md @@ -23,6 +23,10 @@ E.g. `current_profit = 0.05` (5% profit) - stoploss returns `0.02` - then you "l To simulate a regular trailing stoploss of 4% (trailing 4% behind the maximum reached price) you would use the following very simple method: ``` python +# additional imports required +from freqtrade.persistence import Trade +from datetime import datetime + use_custom_stoploss = True def custom_stoploss(self, pair: str, trade: Trade, current_time: datetime, current_rate: float,