diff --git a/docs/developer.md b/docs/developer.md index 05b518184..f1d658ab8 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -202,10 +202,10 @@ For that reason, they must implement the following methods: The `until` portion should be calculated using the provided `calculate_lock_end()` method. -All Protections should use `"stop_duration"` to define how long a a pair (or all pairs) should be locked. +All Protections should use `"stop_duration"` / `"stop_duration_candles"` to define how long a a pair (or all pairs) should be locked. The content of this is made available as `self._stop_duration` to the each Protection. -If your protection requires a look-back period, please use `"lookback_period"` to keep different protections aligned. +If your protection requires a look-back period, please use `"lookback_period"` / `"lockback_period_candles"` to keep all protections aligned. #### Global vs. local stops @@ -230,6 +230,8 @@ The method `global_stop()` will be called whenever a trade closed (sell order co Protections should calculate the lock end time based on the last trade it considers. This avoids relocking should the lookback-period be longer than the actual lock period. +The `IProtection` parent class provides a helper method for this in `calculate_lock_end()`. + --- ## Implement a new Exchange (WIP) diff --git a/freqtrade/plugins/protectionmanager.py b/freqtrade/plugins/protectionmanager.py index d12f4ba80..03a09cc58 100644 --- a/freqtrade/plugins/protectionmanager.py +++ b/freqtrade/plugins/protectionmanager.py @@ -20,9 +20,6 @@ class ProtectionManager(): self._protection_handlers: List[IProtection] = [] for protection_handler_config in self._config.get('protections', []): - if 'method' not in protection_handler_config: - logger.warning(f"No method found in {protection_handler_config}, ignoring.") - continue protection_handler = ProtectionResolver.load_protection( protection_handler_config['method'], config=config,