From 7ae9b901747ca36861b67379ad65d146db9ec9bf Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 1 Nov 2021 20:12:34 +0100 Subject: [PATCH] Further clarify backtesting trailing stop logic part of #5816 --- docs/backtesting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/backtesting.md b/docs/backtesting.md index 37724b02a..75f1ad6f8 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -478,6 +478,7 @@ Since backtesting lacks some detailed information about what happens within a ca - Low happens before high for stoploss, protecting capital first - Trailing stoploss - Trailing Stoploss is only adjusted if it's below the candle's low (otherwise it would be triggered) + - On trade entry candles that trigger trailing stoploss, the "minimum offset" (`stop_positive_offset`) is assumed (instead of high) - and the stop is calculated from this point - High happens first - adjusting stoploss - Low uses the adjusted stoploss (so sells with large high-low difference are backtested correctly) - ROI applies before trailing-stop, ensuring profits are "top-capped" at ROI if both ROI and trailing stop applies