From 43ac04e17c0bc479aac102547c1074aad00b5cf7 Mon Sep 17 00:00:00 2001 From: DrPaprikaa <64958936+DrPaprikaa@users.noreply.github.com> Date: Thu, 3 Sep 2020 18:00:50 +0200 Subject: [PATCH] Added if/else statement in strategy() to account for the case where a custom strategy is specified with a tuple 'params' in --- pandas_ta/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas_ta/core.py b/pandas_ta/core.py index 156ea6e..2966f10 100644 --- a/pandas_ta/core.py +++ b/pandas_ta/core.py @@ -567,7 +567,10 @@ class AnalysisIndicators(BasePandasObject): timed = kwargs.pop("timed", False) if mode["custom"]: if timed: stime = perf_counter() - [getattr(self, kwds["kind"])(**kwds) for kwds in ta] + if "params" in kwds and kwds["params"] and isinstance(kwds["params"], tuple): + [getattr(self, kwds["kind"])(*kwds["params"], **kwds) for kwds in ta] + else: + [getattr(self, kwds["kind"])(**kwds) for kwds in ta] else: # Run ALL or Categorical with multiprocessing if verbose: