From d94b73b396aa9e13d3aa2313ba0c8a54e600786d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Apr 2022 10:44:21 +0200 Subject: [PATCH] Update some documentation --- docs/advanced-hyperopt.md | 2 +- docs/strategy-customization.md | 2 +- tests/optimize/conftest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced-hyperopt.md b/docs/advanced-hyperopt.md index 9dbb86b2d..7f1bd0fed 100644 --- a/docs/advanced-hyperopt.md +++ b/docs/advanced-hyperopt.md @@ -56,7 +56,7 @@ Currently, the arguments are: * `results`: DataFrame containing the resulting trades. The following columns are available in results (corresponds to the output-file of backtesting when used with `--export trades`): - `pair, profit_ratio, profit_abs, open_date, open_rate, fee_open, close_date, close_rate, fee_close, amount, trade_duration, is_open, sell_reason, stake_amount, min_rate, max_rate, stop_loss_ratio, stop_loss_abs` + `pair, profit_ratio, profit_abs, open_date, open_rate, fee_open, close_date, close_rate, fee_close, amount, trade_duration, is_open, exit_reason, stake_amount, min_rate, max_rate, stop_loss_ratio, stop_loss_abs` * `trade_count`: Amount of trades (identical to `len(results)`) * `min_date`: Start date of the timerange used * `min_date`: End date of the timerange used diff --git a/docs/strategy-customization.md b/docs/strategy-customization.md index d413c60ef..348184580 100644 --- a/docs/strategy-customization.md +++ b/docs/strategy-customization.md @@ -898,7 +898,7 @@ Stoploss values returned from `custom_stoploss` must specify a percentage relati !!! Note Providing invalid input to `stoploss_from_open()` may produce "CustomStoploss function did not return valid stoploss" warnings. This may happen if `current_profit` parameter is below specified `open_relative_stop`. Such situations may arise when closing trade - is blocked by `confirm_trade_exit()` method. Warnings can be solved by never blocking stop loss sells by checking `sell_reason` in + is blocked by `confirm_trade_exit()` method. Warnings can be solved by never blocking stop loss sells by checking `exit_reason` in `confirm_trade_exit()`, or by using `return stoploss_from_open(...) or 1` idiom, which will request to not change stop loss when `current_profit < open_relative_stop`. diff --git a/tests/optimize/conftest.py b/tests/optimize/conftest.py index 7b93773f0..8a9e0cbf0 100644 --- a/tests/optimize/conftest.py +++ b/tests/optimize/conftest.py @@ -44,7 +44,7 @@ def hyperopt_results(): 'profit_abs': [-0.2, 0.4, -0.2, 0.6], 'trade_duration': [10, 30, 10, 10], 'amount': [0.1, 0.1, 0.1, 0.1], - 'sell_reason': [ExitType.STOP_LOSS, ExitType.ROI, ExitType.STOP_LOSS, ExitType.ROI], + 'exit_reason': [ExitType.STOP_LOSS, ExitType.ROI, ExitType.STOP_LOSS, ExitType.ROI], 'open_date': [ datetime(2019, 1, 1, 9, 15, 0),