Indicators Util
Dashboard-specific utilities for indicator discovery and registration lookup.
get_registered_indicators()
Return all registered indicator classes.
Returns:
| Type | Description |
|---|---|
dict[str, type]
|
Dictionary mapping indicator class names to their class objects. |
Source code in src/onesecondtrader/dashboard/indicators_util.py
discover_indicators(directory='indicators')
Import all Python files from a directory to register indicators.
Any class inheriting from IndicatorBase in the imported files will be automatically registered via init_subclass.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str | Path
|
Path to the directory containing indicator files. Defaults to "indicators" relative to the current working directory. |
'indicators'
|
Returns:
| Type | Description |
|---|---|
list[str]
|
List of successfully imported module names. |