investfly.models.indicator.IndicatorSeries
Computed indicator series exposed to strategies and screeners.
class
IndicatorSeries:
Represents a series of indicator values over time. Provides methods to access the latest value and detect crossovers.
Get the most recent indicator value.
Returns:
DatedValue: The latest indicator value with its timestamp
Check if this indicator series crosses above another indicator series.
Returns True only on the bar/tick where self crosses above other. This means:
- Previous bar: self < other
- Current bar: self > other
Arguments:
- other: Another IndicatorSeries to compare against
Returns:
bool: True if crossover occurred on the current bar/tick, False otherwise
Check if this indicator series crosses below another indicator series.
Returns True only on the bar/tick where self crosses below other. This means:
- Previous bar: self > other
- Current bar: self < other
Arguments:
- other: Another IndicatorSeries to compare against
Returns:
bool: True if crossunder occurred on the current bar/tick, False otherwise