Clarify that stoploss is required

closes #6740
This commit is contained in:
Matthias 2022-04-29 09:53:05 +00:00
parent d1a61f9c61
commit 48ff788e82
2 changed files with 20 additions and 18 deletions

View File

@ -122,11 +122,11 @@ See [Dataframe access](strategy-advanced.md#dataframe-access) for more informati
## Custom stoploss
Called for open trade every throttling iteration (roughly every 5 seconds) until a trade is closed.
Called for open trade every iteration (roughly every 5 seconds) until a trade is closed.
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).
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 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.

View File

@ -459,6 +459,8 @@ SCHEMA_BACKTEST_REQUIRED = [
'stake_currency',
'stake_amount',
'dry_run_wallet',
'stoploss',
'minimal_roi',
'dataformat_ohlcv',
'dataformat_trades',
]