Merge pull request #5108 from rokups/rk/pessimistic-trailing-stoploss

Implement most pessimistic handling of trailing stoploss.
This commit is contained in:
Matthias
2021-06-17 18:41:00 +01:00
committed by GitHub
4 changed files with 74 additions and 8 deletions

View File

@@ -444,6 +444,7 @@ Since backtesting lacks some detailed information about what happens within a ca
- Stoploss is evaluated before ROI within one candle. So you can often see more trades with the `stoploss` sell reason comparing to the results obtained with the same strategy in the Dry Run/Live Trade modes
- 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)
- 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