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)
|
realistic: do we try to simulate realistic trades? (default: True)
|
||||||
sell_profit_only: sell if profit only
|
sell_profit_only: sell if profit only
|
||||||
use_sell_signal: act on sell-signal
|
use_sell_signal: act on sell-signal
|
||||||
stoploss: use stoploss
|
|
||||||
:return: DataFrame
|
:return: DataFrame
|
||||||
"""
|
"""
|
||||||
headers = ['date', 'buy', 'open', 'close', 'sell']
|
headers = ['date', 'buy', 'open', 'close', 'sell']
|
||||||
@ -224,7 +223,6 @@ def start(args):
|
|||||||
'realistic': args.realistic_simulation,
|
'realistic': args.realistic_simulation,
|
||||||
'sell_profit_only': sell_profit_only,
|
'sell_profit_only': sell_profit_only,
|
||||||
'use_sell_signal': use_sell_signal,
|
'use_sell_signal': use_sell_signal,
|
||||||
'stoploss': strategy.stoploss,
|
|
||||||
'record': args.export
|
'record': args.export
|
||||||
})
|
})
|
||||||
logger.info(
|
logger.info(
|
||||||
|
@ -415,13 +415,10 @@ def generate_optimizer(args):
|
|||||||
backtesting.populate_buy_trend = buy_strategy_generator(params)
|
backtesting.populate_buy_trend = buy_strategy_generator(params)
|
||||||
|
|
||||||
if has_space(args.spaces, 'stoploss'):
|
if has_space(args.spaces, 'stoploss'):
|
||||||
stoploss = params['stoploss']
|
strategy.stoploss = params['stoploss']
|
||||||
else:
|
|
||||||
stoploss = strategy.stoploss
|
|
||||||
|
|
||||||
results = backtest({'stake_amount': OPTIMIZE_CONFIG['stake_amount'],
|
results = backtest({'stake_amount': OPTIMIZE_CONFIG['stake_amount'],
|
||||||
'processed': PROCESSED,
|
'processed': PROCESSED,
|
||||||
'stoploss': stoploss,
|
|
||||||
'realistic': args.realistic_simulation,
|
'realistic': args.realistic_simulation,
|
||||||
})
|
})
|
||||||
result_explanation = format_results(results)
|
result_explanation = format_results(results)
|
||||||
|
Loading…
Reference in New Issue
Block a user