diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index ed8f34851..a0dc8a789 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -103,7 +103,6 @@ def backtest(args) -> DataFrame: realistic: do we try to simulate realistic trades? (default: True) sell_profit_only: sell if profit only use_sell_signal: act on sell-signal - stoploss: use stoploss :return: DataFrame """ headers = ['date', 'buy', 'open', 'close', 'sell'] @@ -224,7 +223,6 @@ def start(args): 'realistic': args.realistic_simulation, 'sell_profit_only': sell_profit_only, 'use_sell_signal': use_sell_signal, - 'stoploss': strategy.stoploss, 'record': args.export }) logger.info( diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index f508440b4..72f61e9d3 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -415,13 +415,10 @@ def generate_optimizer(args): backtesting.populate_buy_trend = buy_strategy_generator(params) if has_space(args.spaces, 'stoploss'): - stoploss = params['stoploss'] - else: - stoploss = strategy.stoploss + strategy.stoploss = params['stoploss'] results = backtest({'stake_amount': OPTIMIZE_CONFIG['stake_amount'], 'processed': PROCESSED, - 'stoploss': stoploss, 'realistic': args.realistic_simulation, }) result_explanation = format_results(results)