Indicators are developed each in its own file. They are then imported and instantiated in listen.py script, together with a Handler object for the table.
Every indicator subclass should be self-contained, meaning that if it relies on "fitted" data (or some aggregate of data), the function that does the fitting should be defined inside the subclass. No outside functions or scripts should be needed to run the indicator.
Good practice is to add a statement in the load_module function such that it calculates the indicator parameters when it does not find them.
setup function in Indicator class should be able to take newly defined parameters.
load_module function should not, as all parameters needed to load the module should be defined or passed to the setup function.
Indicators are developed each in its own file. They are then imported and instantiated in listen.py script, together with a Handler object for the table.
Every indicator subclass should be self-contained, meaning that if it relies on "fitted" data (or some aggregate of data), the function that does the fitting should be defined inside the subclass. No outside functions or scripts should be needed to run the indicator. Good practice is to add a statement in the load_module function such that it calculates the indicator parameters when it does not find them.
setup function in Indicator class should be able to take newly defined parameters. load_module function should not, as all parameters needed to load the module should be defined or passed to the setup function.