to avoid pickle problems, get rid of reference to exchange after initialization

This commit is contained in:
Janne Sinivirta 2018-06-22 21:02:59 +03:00
parent dde7df7fd3
commit e8f2e6956d
1 changed files with 2 additions and 0 deletions

View File

@ -325,6 +325,8 @@ class Hyperopt(Backtesting):
self.analyze.populate_indicators = Hyperopt.populate_indicators # type: ignore
self.processed = self.tickerdata_to_dataframe(data)
self.exchange = None
logger.info('Preparing..')
# read trials file if we have one
if os.path.exists(self.trials_file) and os.path.getsize(self.trials_file) > 0: