Analysis Panels
Relevant source files
The following files were used as context for generating this wiki page:
Analysis Panels constitute the core decision-support interface of the Rabid Raccoon platform. These components provide multi-timeframe technical analysis, macro-economic context, and automated trade identification by combining deterministic mathematical signals with AI-driven interpretation. The system processes over 200 technical signals across multiple timeframes (15M, 1H, 4H) to generate actionable trading insights for MES (Micro E-mini S&P 500) futures and related macro assets.
The panels are organized into specialized tabs—Chart, Market, and Trades—each handling a specific domain of the analysis engine. This modular approach allows traders to verify "raw math" signals against high-level narrative overlays provided by LLMs like Claude Opus and GPT-5.
Sources: src/lib/instant-analysis.ts:11-20, src/components/AnalysePanel.tsx:68-80
Architecture and Data Flow
The analysis architecture follows a hybrid model: deterministic technical indicators are computed locally or on the server, while complex pattern recognition and narrative synthesis are offloaded to AI models.
System Data Flow
The following diagram illustrates how data flows from market sources through the analysis engine to the UI panels.
The system utilizes Prisma to fetch raw 15m candles, which are then aggregated into higher timeframes (1H, 4H) for multi-timeframe consistency.
Sources: src/app/api/analyse/chart/route.ts:98-110, src/lib/instant-analysis.ts:742-760
Interaction Sequence
This sequence shows the typical lifecycle of a chart analysis request initiated by a user.
Key Components
AnalysePanel
The primary entry point for manual analysis. It provides three main diagnostic modes:
- Analyze Chart: Uses Vision AI (Claude Opus 4.6) to detect reversals, continuations, and geometric patterns (triangles, channels).
- Analyze Market: Aggregates macro context, including VIX regimes, yield curve dynamics (US10Y), and news theme scores.
- Upcoming Trades: Scans for deterministic AB=CD measured move patterns.
Sources: src/components/AnalysePanel.tsx:68-150
Instant Analysis Engine
Located in src/lib/instant-analysis.ts, this engine is responsible for computing the "Raw Math" signals. It calculates over 200 signals including:
- Moving Averages: SMA and EMA crossovers across 5, 10, 20, 50, 100, and 200 periods.
- Oscillators: RSI, Stochastic, Williams %R, CCI, and ROC.
- Structure: Fibonacci retracements and automated Swing Detection.
- Volatility: ATR expansion/contraction and VIX-based regime filtering.
Sources: src/lib/instant-analysis.ts:130-260
Data Models and Types
The analysis panels rely on structured interfaces to ensure consistency between the technical engine and the UI components.
Analysis Results Structure
| Feature | Data Structure | Description |
|---|---|---|
| Overall Verdict | overallVerdict | "BUY" or "SELL" bias derived from the lead timeframe (usually 15M). |
| Confidence | overallConfidence | Numeric percentage (50-95%) representing signal strength. |
| Gauges | TimeframeGauge[] | Specific buy/sell/neutral counts for 15M, 1H, and 4H periods. |
| Symbols | InstantSymbolResult[] | Per-symbol entry, stop, and target levels for MES, NQ, VX, etc. |
| Market Context | MarketContext | Includes Regimes (Risk-On/Off), Correlations, and News Themes. |
Sources: src/lib/instant-analysis.ts:285-350, src/components/AnalysePanel.tsx:18-50
VIX Regime Filtering
The system applies a hard VIX filter to dampen or flip directional biases based on market volatility.
| VIX Level | Regime | Impact on Analysis |
|---|---|---|
| < 16.00 | LOW | Long confidence accelerated; short confidence reduced. |
| 16.00 - 18.00 | MODERATE | Neutral/Standard weighting. |
| >= 18.00 | ELEVATED | Long confidence damped. |
| >= 20.00 | HIGH | Hard short filter: Timeframe gauges must flip to SELL for LONG setups. |
Sources: src/lib/instant-analysis.ts:460-505
Trade Identification Logic
The panels identify trades using a combination of Measured Moves (AB=CD) and ATR-derived levels.
Measured Move Detection
The engine identifies price swings to project "D" targets based on the length of the "A to B" leg.
- Status: Tracks moves in
FORMING,ACTIVE,COMPLETED, orFAILEDstates. - Quality: A score (0-100) based on the symmetry and retracement ratio of the move.
- Retracement: Ideally targets the 0.618 Fibonacci level for high-quality entries.
Sources: src/lib/instant-analysis.ts:240-255, src/components/AnalysePanel.tsx:430-470, src/components/TechChart.tsx:154-175
Level Generation Sequence
Sources: src/lib/instant-analysis.ts:515-580
API Endpoints
The Analysis Panels interact with several server-side routes to process heavy data or AI requests.
| Endpoint | Method | Input | Output |
|---|---|---|---|
/api/analyse/chart | POST | Base64 Image | ChartAnalysisResult (JSON) |
/api/analyse/market | POST | N/A | MarketContext (Macro data) |
/api/analyse/trades | POST | N/A | TradesResult (AB=CD patterns) |
Sources: src/components/AnalysePanel.tsx:88-135, src/app/api/analyse/chart/route.ts:80-90
Summary
Analysis Panels bridge the gap between complex market data and trade execution. By centralizing deterministic signal math and augmenting it with AI-powered vision and narrative capabilities, the system provides a multi-layered view of market conditions. This structure ensures that every trading recommendation is grounded in mathematical signals (like SMA crossovers and RSI levels) while remaining responsive to shifting macro regimes and chart patterns.
Sources: src/lib/instant-analysis.ts:7-15, src/components/MarketsPage.tsx:35-50