From b5034cf53579101ae9af06ad22e130cddf097ecb Mon Sep 17 00:00:00 2001 From: misagh Date: Thu, 14 Mar 2019 09:04:41 +0100 Subject: [PATCH] TSL validator removed from exchange --- freqtrade/exchange/exchange.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index b82959680..33f62f2f7 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -118,7 +118,6 @@ class Exchange(object): self.validate_pairs(config['exchange']['pair_whitelist']) self.validate_ordertypes(config.get('order_types', {})) self.validate_order_time_in_force(config.get('order_time_in_force', {})) - self.validate_trailing_stoploss(config) if config.get('ticker_interval'): # Check if timeframe is available @@ -285,28 +284,6 @@ class Exchange(object): raise OperationalException( f'Time in force policies are not supporetd for {self.name} yet.') - def validate_trailing_stoploss(self, config) -> None: - """ - Validates the trailing stoploss configuration - """ - # Skip if trailing stoploss is not activated - if not config.get('trailing_stop', False): - return - - tsl_positive = float(config.get('trailing_stop_positive', 0)) - tsl_offset = float(config.get('trailing_stop_positive_offset', 0)) - tsl_only_offset = config.get('trailing_only_offset_is_reached', False) - - if tsl_only_offset: - if tsl_positive == 0.0: - raise OperationalException( - f'The config trailing_only_offset_is_reached need ' - 'trailing_stop_positive_offset to be more than 0 in your config.') - if tsl_positive > 0 and 0 < tsl_offset <= tsl_positive: - raise OperationalException( - f'The config trailing_stop_positive_offset need ' - 'to be greater than trailing_stop_positive_offset in your config.') - def exchange_has(self, endpoint: str) -> bool: """ Checks if exchange implements a specific API endpoint.