enable --dmmp for hyperopt
This commit is contained in:
		| @@ -190,11 +190,21 @@ class Hyperopt(Backtesting): | |||||||
|             self.strategy.stoploss = params['stoploss'] |             self.strategy.stoploss = params['stoploss'] | ||||||
|  |  | ||||||
|         processed = load(TICKERDATA_PICKLE) |         processed = load(TICKERDATA_PICKLE) | ||||||
|  |  | ||||||
|  |         # Use max_open_trades for hyperopt as well, except --disable-max-market-positions is set | ||||||
|  |         if self.config.get('use_max_market_positions', True): | ||||||
|  |             max_open_trades = self.config['max_open_trades'] | ||||||
|  |         else: | ||||||
|  |             logger.info('Ignoring max_open_trades (--disable-max-market-positions was used) ...') | ||||||
|  |             max_open_trades = 0 | ||||||
|  |  | ||||||
|         min_date, max_date = get_timeframe(processed) |         min_date, max_date = get_timeframe(processed) | ||||||
|  |  | ||||||
|         results = self.backtest( |         results = self.backtest( | ||||||
|             { |             { | ||||||
|                 'stake_amount': self.config['stake_amount'], |                 'stake_amount': self.config['stake_amount'], | ||||||
|                 'processed': processed, |                 'processed': processed, | ||||||
|  |                 'max_open_trades': max_open_trades, | ||||||
|                 'position_stacking': self.config.get('position_stacking', False), |                 'position_stacking': self.config.get('position_stacking', False), | ||||||
|                 'start_date': min_date, |                 'start_date': min_date, | ||||||
|                 'end_date': max_date, |                 'end_date': max_date, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user