remove stoploss parameter from backtest, it is loaded from strategy
This commit is contained in:
parent
bf72b5bc37
commit
fac122891f
@ -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(
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user