This commit is contained in:
David Brazda
2024-10-18 12:25:48 +02:00
parent 8805f854e0
commit 9d70678e8c
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='ttools',
version='0.2.5',
version='0.2.6',
packages=find_packages(),
install_requires=[
'vectorbtpro',

View File

@ -81,7 +81,7 @@ def register_custom_inds(indicator_name: str = None, if_exists: str ="skip"):
else:
for var_name, var_value in globals().items():
if var_name.startswith("IND_") and isinstance(var_value, vbt.IndicatorFactory):
vbt.IF.deregister_custom_indicator(var_value, location="ttools")
vbt.IF.register_custom_indicator(var_value, location="ttools", if_exists=if_exists)
def deregister_custom_inds(indicator_name: str = None):
"""Deregister a custom indicator or all custom indicators.
@ -101,4 +101,4 @@ def deregister_custom_inds(indicator_name: str = None):
else:
for var_name, var_value in globals().items():
if var_name.startswith("IND_") and isinstance(var_value, vbt.IndicatorFactory):
vbt.IF.rdeegister_custom_indicator(var_value, location="ttools")
vbt.IF.deregister_custom_indicator(var_value, location="ttools")