Make RollingWindow compatible with any data type (#8836)

* Make RollingWindow compatible with any data type

* Add generic RW<T> method

* Add RollingWindow wrapper class for PyObject

* Solve review comments

* Resolve review comments
This commit is contained in:
JosueNina
2025-06-18 16:29:00 -05:00
committed by GitHub
parent 4dcd41b690
commit 5729be4661
14 changed files with 112 additions and 15 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ class CustomIndicatorAlgorithm(QCAlgorithm):
# The python custom class must inherit from PythonIndicator to enable Updated event handler
self._custom.updated += self.custom_updated
self._custom_window = RollingWindow[IndicatorDataPoint](5)
self._custom_window = RollingWindow(5)
self.register_indicator("SPY", self._custom, Resolution.MINUTE)
self.plot_indicator('CSMA', self._custom)