diff --git a/bindings/python/python/wickra/__init__.pyi b/bindings/python/python/wickra/__init__.pyi index 236b480f..87d8611a 100644 --- a/bindings/python/python/wickra/__init__.pyi +++ b/bindings/python/python/wickra/__init__.pyi @@ -190,7 +190,7 @@ class CCI: def period(self) -> int: ... class ROC: - def __init__(self, period: int) -> None: ... + def __init__(self, period: int = 10) -> None: ... def update(self, value: float) -> Optional[float]: ... def batch(self, prices: NDArray[np.float64]) -> NDArray[np.float64]: ... def reset(self) -> None: ... @@ -242,7 +242,7 @@ class MFI: def warmup_period(self) -> int: ... class TRIX: - def __init__(self, period: int) -> None: ... + def __init__(self, period: int = 30) -> None: ... def update(self, value: float) -> Optional[float]: ... def batch(self, prices: NDArray[np.float64]) -> NDArray[np.float64]: ... def reset(self) -> None: ... diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index 8bf108f4..4c306bd6 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -836,6 +836,7 @@ struct PyRoc { #[pymethods] impl PyRoc { #[new] + #[pyo3(signature = (period=10))] fn new(period: usize) -> PyResult { Ok(Self { inner: wc::Roc::new(period).map_err(map_err)?, @@ -1054,6 +1055,7 @@ struct PyTrix { #[pymethods] impl PyTrix { #[new] + #[pyo3(signature = (period=30))] fn new(period: usize) -> PyResult { Ok(Self { inner: wc::Trix::new(period).map_err(map_err)?,