TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-kit/llms.txt
Use this file to discover all available pages before exploring further.
@backtest-kit/signals package is a technical analysis and signal generation library built specifically for AI-powered trading systems. It computes more than 50 indicators across four timeframes and formats the results as Markdown reports that slot directly into LLM context messages. Instead of manually calculating RSI, MACD, Fibonacci levels, and order book depth before each getSignal call, a single function invocation adds a comprehensive market snapshot to your message array — ready for the LLM to reason over.
Key Features
Multi-Timeframe Analysis
Compute all indicators across 1m, 15m, 30m, and 1h candles simultaneously. Timeframes are synchronized automatically using backtest-kit’s temporal context.
50+ Technical Indicators
RSI, MACD, Bollinger Bands, Stochastic, ADX, ATR, CCI, Fibonacci retracements, and dynamic Support/Resistance levels — all computed in a single call.
Order Book Analysis
Bid/ask depth, spread, liquidity imbalance, and top 20 price levels are included in the report alongside the candlestick indicators.
AI-Ready Output
Output is Markdown formatted for LLM context injection. Paste directly into a system or user message and the model has full market awareness.
Performance Optimized
Intelligent caching with configurable TTL per timeframe. Repeated calls within the same candle interval return the cached report with no recomputation.
@backtest-kit/signals works seamlessly with backtest-kit’s AsyncLocalStorage temporal context. All candle fetches use the current backtest timestamp automatically — look-ahead bias is structurally impossible.Getting Started
Included Indicators
The Markdown report covers the following indicators across all four timeframes:| Category | Indicators |
|---|---|
| Momentum | RSI (14), Stochastic %K/%D, CCI (20), MACD line/signal/histogram |
| Trend | ADX, +DI, -DI, EMA (9, 21, 50, 200), SMA (20, 50) |
| Volatility | Bollinger Bands (upper/middle/lower), ATR (14), Band Width |
| Structure | Fibonacci retracement levels (0.236, 0.382, 0.5, 0.618, 0.786) |
| Levels | Dynamic support and resistance zones derived from recent swing highs/lows |
| Order Book | Bid/ask spread, depth imbalance, top 20 bid and ask price levels |
Why Markdown Output?
LLMs perform better when market context is structured as readable prose and tables rather than raw JSON arrays.@backtest-kit/signals formats every indicator value with its label, current reading, and a brief interpretation (e.g., “RSI 67.4 — approaching overbought”) so the model can reason about relative strength, confluence, and divergence without needing numeric post-processing.