condensed strategy methods down to 2

This commit is contained in:
Sam Germain
2021-08-18 04:19:17 -06:00
parent d4a7d2d444
commit 092780df9d
22 changed files with 451 additions and 773 deletions

View File

@@ -202,14 +202,11 @@ 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)
strategy._short_fun_len = len(getfullargspec(strategy.populate_short_trend).args)
strategy._exit_short_fun_len = len(
getfullargspec(strategy.populate_exit_short_trend).args)
if any(x == 2 for x in [strategy._populate_fun_len,
strategy._buy_fun_len,
strategy._sell_fun_len,
strategy._short_fun_len,
strategy._exit_short_fun_len]):
if any(x == 2 for x in [
strategy._populate_fun_len,
strategy._buy_fun_len,
strategy._sell_fun_len
]):
strategy.INTERFACE_VERSION = 1
return strategy