No specific handling for trailing_stop_positive

This commit is contained in:
hroff-1902
2019-10-11 22:59:13 +03:00
parent ff7a3cc885
commit 4c1705fb1e
2 changed files with 6 additions and 4 deletions

View File

@@ -95,7 +95,10 @@ class StrategyResolver(IResolver):
logger.info("Override strategy '%s' with value in config file: %s.",
attribute, config[attribute])
elif hasattr(self.strategy, attribute):
config[attribute] = getattr(self.strategy, attribute)
val = getattr(self.strategy, attribute)
# None's cannot exist in the config, so do not copy them
if val is not None:
config[attribute] = val
# Explicitly check for None here as other "falsy" values are possible
elif default is not None:
setattr(self.strategy, attribute, default)