custom_analysis
Run user-defined technical analysis on one ticker with custom indicators, derived series, conditions, and price levels, returning JSON results and an optional chart.
Instructions
User-defined technical analysis on one ticker, with an optional chart.
indicators: catalog indicators with parameters, e.g. [{"id": "ema20", "fn": "ema", "params": {"n": 20}}, {"id": "rsi14", "fn": "rsi"}, {"id": "bb", "fn": "bollinger", "params": {"n": 20, "k": 2}}] series: derived series by expression, e.g. [{"id": "dist", "expr": "close / bb.lower - 1"}] conditions: true/false rules evaluated on every bar, e.g. [{"name": "Oversold in uptrend", "when": "rsi14 < 30 and close > sma200"}, {"name": "Golden cross", "when": "crosses_above(sma50, sma200)"}] For each: active now, number and dates of events, and forward returns after events against all bars (5 and 20 sessions) with a t statistic. levels: horizontal lines, e.g. [{"price": 25.5, "label": "support"}]. Returns JSON with last values and condition reports, plus the PNG chart when chart is true. Call list_indicator_catalog first to see indicators, parameters and functions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chart | No | ||
| title | No | ||
| levels | No | ||
| period | No | 1y | |
| series | No | ||
| ticker | Yes | ||
| conditions | No | ||
| indicators | Yes |