44 lines
1.6 KiB
Python
Raw Normal View History

2025-05-26 13:26:07 +08:00
"""
Incremental Indicator States Module
This module contains indicator state classes that maintain calculation state
for incremental processing of technical indicators.
All indicator states implement the IndicatorState interface and provide:
- Incremental updates with new data points
- Constant memory usage regardless of data history
- Identical results to traditional batch calculations
- Warm-up detection for reliable indicator values
Classes:
IndicatorState: Abstract base class for all indicator states
MovingAverageState: Incremental moving average calculation
ExponentialMovingAverageState: Incremental exponential moving average calculation
2025-05-26 13:26:07 +08:00
RSIState: Incremental RSI calculation
SimpleRSIState: Incremental simple RSI calculation
2025-05-26 13:26:07 +08:00
ATRState: Incremental Average True Range calculation
SimpleATRState: Incremental simple ATR calculation
2025-05-26 13:26:07 +08:00
SupertrendState: Incremental Supertrend calculation
BollingerBandsState: Incremental Bollinger Bands calculation
BollingerBandsOHLCState: Incremental Bollinger Bands OHLC calculation
2025-05-26 13:26:07 +08:00
"""
from .base import IndicatorState
from .moving_average import MovingAverageState, ExponentialMovingAverageState
from .rsi import RSIState, SimpleRSIState
from .atr import ATRState, SimpleATRState
2025-05-26 13:26:07 +08:00
from .supertrend import SupertrendState
from .bollinger_bands import BollingerBandsState, BollingerBandsOHLCState
2025-05-26 13:26:07 +08:00
__all__ = [
'IndicatorState',
'MovingAverageState',
'ExponentialMovingAverageState',
2025-05-26 13:26:07 +08:00
'RSIState',
'SimpleRSIState',
2025-05-26 13:26:07 +08:00
'ATRState',
'SimpleATRState',
2025-05-26 13:26:07 +08:00
'SupertrendState',
'BollingerBandsState',
'BollingerBandsOHLCState'
2025-05-26 13:26:07 +08:00
]