Indicators
OneSecondTrader's library of pre-built indicators.
BaseIndicator
Bases: ABC
Base class for indicators. Subclasses must set the name property and implement
the _compute_indicator() method. See SimpleMovingAverage for an example.
Source code in src/onesecondtrader/indicators.py
InputSource
Bases: Enum
Enum of supported input sources for indicators. Indicators with a input_source
parameter can be configured to use one of these sources for their calculations.
Source code in src/onesecondtrader/indicators.py
SimpleMovingAverage
Bases: BaseIndicator
Simple Moving Average (SMA) indicator. Can be configured to use different input
sources (see InputSource enum, default is InputSource.CLOSE).