From 57396433084295fda2a9874a86a4cd5fb39f7b95 Mon Sep 17 00:00:00 2001 From: "damon.yuan" Date: Mon, 2 Oct 2023 20:55:47 +0800 Subject: [PATCH] pass the period argument to OLS_Slope_InterceptN --- backtrader/indicators/ols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backtrader/indicators/ols.py b/backtrader/indicators/ols.py index 639a84502..716261d76 100644 --- a/backtrader/indicators/ols.py +++ b/backtrader/indicators/ols.py @@ -68,7 +68,7 @@ class OLS_TransformationN(PeriodN): params = (('period', 10),) def __init__(self): - slint = OLS_Slope_InterceptN(*self.datas) + slint = OLS_Slope_InterceptN(*self.datas, period=self.p.period) spread = self.data0 - (slint.slope * self.data1 + slint.intercept) self.l.spread = spread