calculate_indicator
Calculate technical indicators for stocks or cryptocurrencies, including RSI, MACD, SMA, EMA, Bollinger Bands, and Stochastic oscillator. Returns values with timestamps and trading signals.
Instructions
Calculate technical indicators on price data for a stock or cryptocurrency. Supports RSI, MACD, SMA, EMA, Bollinger Bands, and Stochastic oscillator. Returns calculated values with timestamps and trading signals where applicable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Lookback period for calculation (default varies by indicator: RSI=14, SMA/EMA=20, Bollinger Bands=20, Stochastic=14, MACD=12 for fast period) | |
| symbol | Yes | Ticker symbol (e.g., AAPL, BTC-USD, MSFT) | |
| interval | No | Data interval for calculations (default: 1d for daily data) | |
| indicator | Yes | Technical indicator to calculate: - rsi: Relative Strength Index (momentum oscillator, 0-100) - macd: Moving Average Convergence Divergence (trend following) - sma: Simple Moving Average (trend indicator) - ema: Exponential Moving Average (trend indicator, more responsive) - bollinger_bands: Bollinger Bands (volatility indicator) - stochastic: Stochastic Oscillator (momentum indicator) | |
| startDate | No | Start date for historical data (optional, defaults to sufficient data for indicator) |