Added short and exit_short to strategy
This commit is contained in:
@@ -51,6 +51,7 @@ class HyperOptResolver(IResolver):
|
||||
if not hasattr(hyperopt, 'populate_sell_trend'):
|
||||
logger.info("Hyperopt class does not provide populate_sell_trend() method. "
|
||||
"Using populate_sell_trend from the strategy.")
|
||||
# TODO-lev: Short equivelents?
|
||||
return hyperopt
|
||||
|
||||
|
||||
|
@@ -202,9 +202,14 @@ 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._sell_fun_len,
|
||||
strategy._short_fun_len,
|
||||
strategy._exit_short_fun_len]):
|
||||
strategy.INTERFACE_VERSION = 1
|
||||
|
||||
return strategy
|
||||
|
Reference in New Issue
Block a user