mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Add signals enum to 'export' cli option
This commit is contained in:
parent
f92997d378
commit
767592a1d6
|
@ -23,7 +23,7 @@ ARGS_COMMON_OPTIMIZE = ["timeframe", "timerange", "dataformat_ohlcv",
|
|||
|
||||
ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_positions",
|
||||
"enable_protections", "dry_run_wallet", "timeframe_detail",
|
||||
"strategy_list", "export", "exportfilename",
|
||||
"strategy_list", "export", "exportfilename"
|
||||
"backtest_breakdown", "backtest_cache"]
|
||||
|
||||
ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
|
||||
|
|
|
@ -14,7 +14,7 @@ PROCESS_THROTTLE_SECS = 5 # sec
|
|||
HYPEROPT_EPOCH = 100 # epochs
|
||||
RETRY_TIMEOUT = 30 # sec
|
||||
TIMEOUT_UNITS = ['minutes', 'seconds']
|
||||
EXPORT_OPTIONS = ['none', 'trades']
|
||||
EXPORT_OPTIONS = ['none', 'trades', 'signals']
|
||||
DEFAULT_DB_PROD_URL = 'sqlite:///tradesv3.sqlite'
|
||||
DEFAULT_DB_DRYRUN_URL = 'sqlite:///tradesv3.dryrun.sqlite'
|
||||
UNLIMITED_STAKE_AMOUNT = 'unlimited'
|
||||
|
@ -380,7 +380,6 @@ CONF_SCHEMA = {
|
|||
},
|
||||
'position_adjustment_enable': {'type': 'boolean'},
|
||||
'max_entry_position_adjustment': {'type': ['integer', 'number'], 'minimum': -1},
|
||||
'backtest_signal_candle_export_enable': {'type': 'boolean'},
|
||||
},
|
||||
'definitions': {
|
||||
'exchange': {
|
||||
|
|
|
@ -1077,7 +1077,7 @@ class Backtesting:
|
|||
})
|
||||
self.all_results[self.strategy.get_strategy_name()] = results
|
||||
|
||||
if self.backtest_signal_candle_export_enable and \
|
||||
if self.config.get('export', 'none') == 'signals' and \
|
||||
self.dataprovider.runmode == RunMode.BACKTEST:
|
||||
self._generate_trade_signal_candles(preprocessed_tmp, results)
|
||||
|
||||
|
@ -1163,8 +1163,9 @@ class Backtesting:
|
|||
if self.config.get('export', 'none') == 'trades':
|
||||
store_backtest_stats(self.config['exportfilename'], self.results)
|
||||
|
||||
if self.backtest_signal_candle_export_enable and \
|
||||
if self.config.get('export', 'none') == 'signals' and \
|
||||
self.dataprovider.runmode == RunMode.BACKTEST:
|
||||
store_backtest_stats(self.config['exportfilename'], self.results)
|
||||
store_backtest_signal_candles(self.config['exportfilename'], self.processed_dfs)
|
||||
|
||||
# Results may be mixed up now. Sort them so they follow --strategy-list order.
|
||||
|
|
Loading…
Reference in New Issue
Block a user