# Buggy code
def __init__(
    self,
    exchange,
    pairlistmanager,
    config: Dict[str, Any],
    pairlistconfig: Dict[str, Any],
    pairlist_pos: int,
) -> None:
    super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)

    self._stoploss = self._config["stoploss"]
    self._enabled = self._stoploss != 0

    # Precalculate sanitized stoploss value to avoid recalculation for every pair
    self._stoploss = 1 - abs(self._stoploss)


# Traceback (KeyError)
freqtrade backtesting  --strategy-list ADXMomentum AdxSmas ASDTSRockwellTrading AverageStrategy AwesomeMacd BbandRsi BinHV27 BinHV45 CCIStrategy ClucMay72018 CMCWinner CofiBitStrategy CombinedBinHAndCluc EMASkipPump Low_BB MACDStrategy MACDStrategy_crossed MultiRSI Quickie ReinforcedQuickie ReinforcedSmoothScalp Scalp Simple SmoothScalp Ichimoku BbandRsi_AP4 Bblow_AP Bblow_AP1 --config config_pairs1.json  --timerange=20180801-20200515 --export trades --ticker-interval 1h
2020-05-23 13:10:49,365 - freqtrade.loggers - INFO - Verbosity set to 0
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Parameter -i/--ticker-interval detected ... Using ticker_interval: 1h ...
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 10 ...
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20180801-20200515 ...
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Using user-data directory: /home/andreas/freqtrade/user_data ...
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Using data directory: /home/andreas/freqtrade/user_data/data/binance ...
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Using strategy list of 28 strategies
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Overriding ticker interval with Command line argument
2020-05-23 13:10:49,365 - freqtrade.configuration.configuration - INFO - Parameter --export detected: trades ...
2020-05-23 13:10:49,366 - freqtrade.configuration.check_exchange - INFO - Checking exchange...
2020-05-23 13:10:49,366 - freqtrade.configuration.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team.
2020-05-23 13:10:49,366 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration.
2020-05-23 13:10:49,366 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2020-05-23 13:10:49,367 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode
2020-05-23 13:10:49,367 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2020-05-23 13:10:49,367 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'enableRateLimit': True}
2020-05-23 13:10:49,369 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'enableRateLimit': True, 'rateLimit': 5000}
2020-05-23 13:10:49,371 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance"
2020-05-23 13:10:50,218 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'...
2020-05-23 13:10:50,219 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist StaticPairList from '/home/andreas/freqtrade/freqtrade/pairlist/StaticPairList.py'...
2020-05-23 13:10:50,219 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist PrecisionFilter from '/home/andreas/freqtrade/freqtrade/pairlist/PrecisionFilter.py'...
2020-05-23 13:10:50,220 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
File "/home/andreas/freqtrade/freqtrade/main.py", line 36, in main
return_code = args['func'](args)
File "/home/andreas/freqtrade/freqtrade/commands/optimize_commands.py", line 48, in start_backtesting
backtesting = Backtesting(config)
File "/home/andreas/freqtrade/freqtrade/optimize/backtesting.py", line 67, in __init__
self.pairlists = PairListManager(self.exchange, self.config)
File "/home/andreas/freqtrade/freqtrade/pairlist/pairlistmanager.py", line 38, in __init__
pairlist_pos=len(self._pairlist_handlers)
File "/home/andreas/freqtrade/freqtrade/resolvers/pairlist_resolver.py", line 42, in load_pairlist
'pairlist_pos': pairlist_pos},
File "/home/andreas/freqtrade/freqtrade/resolvers/iresolver.py", line 136, in load_object
kwargs=kwargs)
File "/home/andreas/freqtrade/freqtrade/resolvers/iresolver.py", line 113, in _load_object
return module(**kwargs)
File "/home/andreas/freqtrade/freqtrade/pairlist/PrecisionFilter.py", line 20, in __init__
self._stoploss = self._config['stoploss']
KeyError: 'stoploss'

# Fixed code
def __init__(
    self,
    exchange,
    pairlistmanager,
    config: Dict[str, Any],
    pairlistconfig: Dict[str, Any],
    pairlist_pos: int,
) -> None:
    super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)

    if "stoploss" not in self._config:
        raise OperationalException(
            "PrecisionFilter can only work with stoploss defined. Please add the "
            "stoploss key to your configuration (overwrites eventual strategy settings)."
        )
    self._stoploss = self._config["stoploss"]
    self._enabled = self._stoploss != 0

    # Precalculate sanitized stoploss value to avoid recalculation for every pair
    self._stoploss = 1 - abs(self._stoploss)