Introduce strategy_version variable

This commit is contained in:
Matthias
2019-08-26 19:44:33 +02:00
parent 4fcfb1eaca
commit 92011f8294
5 changed files with 40 additions and 2 deletions

View File

@@ -153,6 +153,10 @@ class StrategyResolver(IResolver):
strategy._populate_fun_len = len(getfullargspec(strategy.populate_indicators).args)
strategy._buy_fun_len = len(getfullargspec(strategy.populate_buy_trend).args)
strategy._sell_fun_len = len(getfullargspec(strategy.populate_sell_trend).args)
if any([x == 2 for x in [strategy._populate_fun_len,
strategy._buy_fun_len,
strategy._sell_fun_len]]):
strategy.strategy_version = 1
try:
return import_strategy(strategy, config=config)