Add ticker_interval support in strategy class

This commit is contained in:
Gerald Lonlas
2018-01-20 14:40:41 -08:00
parent 5eb7aa07a1
commit 41aa8f18fb
7 changed files with 41 additions and 4 deletions

View File

@@ -41,10 +41,23 @@ class Strategy(object):
if 'stoploss' in config:
self.custom_strategy.stoploss = config['stoploss']
self.logger.info("Override strategy \'stoploss\' with value in config file.")
self.logger.info(
"Override strategy \'stoploss\' with value in config file: {}.".format(
config['stoploss']
)
)
if 'ticker_interval' in config:
self.custom_strategy.ticker_interval = config['ticker_interval']
self.logger.info(
"Override strategy \'ticker_interval\' with value in config file: {}.".format(
config['ticker_interval']
)
)
self.minimal_roi = self.custom_strategy.minimal_roi
self.stoploss = self.custom_strategy.stoploss
self.ticker_interval = self.custom_strategy.ticker_interval
def _load_strategy(self, strategy_name: str) -> None:
"""