Expand description
§indica
Fast technical analysis indicators for stock markets. SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Pivot Points, and more.
Modules§
Structs§
- Bollinger
Bands Result - Bollinger Bands result.
- Macd
Result - MACD computation result.
- Pivot
Points Result - Classic Pivot Points result.
Enums§
- Crossover
- MACD crossover direction.
Functions§
- atr
- Average True Range using Wilder’s smoothing.
Requires
period + 1data points minimum. ReturnsNoneif insufficient data. - bollinger_
bands - Bollinger Bands (default: period=20, std_dev_multiplier=2.0).
Returns
Noneif insufficient data. - ema
- Exponential Moving Average.
Seeded with SMA of the first
periodvalues, then smoothed forward. ReturnsNoneif there are fewer values thanperiod. - macd
- MACD (Moving Average Convergence Divergence).
Default parameters: fast=12, slow=26, signal=9.
Returns
Noneif insufficient data. - pivot_
points - Classic Pivot Points from a single candle (typically previous day).
- relative_
strength - Relative Strength vs a benchmark (e.g., Nifty 50).
RS = 1 + (stock_return - benchmark_return).
Returns >1 if outperforming, <1 if underperforming.
Returns
Noneif insufficient data. - rsi
- Relative Strength Index using Wilder’s smoothing.
Default period is typically 14.
Returns
Noneif insufficient data (need at leastperiod + 1values). - sma
- Simple Moving Average of the last
periodvalues. ReturnsNoneif there are fewer values thanperiod. - volume_
trend - Classify volume trend by comparing recent 5-day avg to 20-day avg. Returns a static string: “surging”, “increasing”, “stable”, “declining”, “drying up”, or “insufficient data”.