Security: Ticker accepts A–Z letters only (1–6 chars). API key must match sk-ant-... format. Your key is never stored — sent only to api.anthropic.com via CSP-restricted connection. No third-party scripts.
📊Pre-Trade Analysis
A–Z only, 1–6 letters
Must start with sk-ant-
NVDAclaude-sonnet-4 · 8 sections + 12 scores
Act as a professional trader and give me a concise pre-trade
analysis for NVDA for a potential LONG position.
1. Trend & Momentum·2. Bollinger Bands3. Key Levels·4. ATR & Risk5. Volume & Structure·6. Catalysts7. Trade Plan·8. Multi-Day OutlookVerdict: “Good entry now” OR “Wait for pullback to $___” OR “Avoid — reason”
SCORES(each 1–10, 10 = most favorable for long entry):
Trend Direction Score: X/10
RSI Score: X/10
Bollinger Position Score: X/10
Bollinger Volatility Score: X/10
Breakout vs Pullback Score: X/10
Volume Confirmation Score: X/10
Key Levels Score: X/10
ATR Risk Score: X/10
Catalyst Score: X/10
Trade Setup Score: X/10
Outlook Score: X/10
Overall Score: X/10
Claude is building analysis + 12-score scorecard…
Claude’s verdict ·
📈Trade Setup Scorecard
—/10
Context
Why build a Claude-powered trade analyzer?
Most retail traders spend 20–30 minutes pulling together trend data, Bollinger Bands, RSI, ATR, and catalyst checks before every trade. This tool collapses that workflow into a single structured API call — returning a full 8-section analysis and 12-dimension scorecard in ~10 seconds.
8
Analysis sections
12
Scores generated
~10s
Time to full output
0
Backend servers
Understanding the Analysis
Trading terms, how Claude agents work, and the prompt structure — all explained.
RSI score
Rates RSI position 1–10. RSI 40–60 = neutral (5–6). RSI <40 from oversold bounce = bullish (8–9). RSI >70 approaching overbought = bearish (2–3). Divergence from price adds weight.
Bollinger position score
Rates where price sits within the bands. Near lower band = high score (potential discount entry). Near upper band = low score (extended/overbought). Mid-band = neutral 5.
Bollinger volatility score
Rates band width and direction. Bands squeezing (narrowing) before a breakout = high score. Bands already wide and expanding = lower score — most of the move may already be priced in.
Breakout vs pullback score
Rates the structural entry quality. Clean pullback to support in uptrend = high score (favorable R/R). Chasing a breakout extension = low score. Range-bound with no clear setup = 5.
Volume confirmation score
Rates volume behavior. Declining volume on pullback (healthy retracement) = high score. Rising volume on breakout = high score. Breakout on low volume = low score — conviction is absent.
ATR & risk score
Rates the ATR-implied daily risk. Small ATR relative to entry distance = high score (tight stop viable). Large ATR requiring wide stop = lower score. A 14-day ATR of $6 means $9 stop minimum (1.5×).
Key levels score
Rates proximity and clarity of support/resistance. Entry near a clean, untested support = high score. Entry in open air with no nearby level = low score. Multiple confluent levels = highest score.
Catalyst score
Rates macro and event risk. No earnings, no FOMC in the next 2 weeks = high score. Earnings next week = low score (binary risk). Positive recent news flow = +1 bonus to score.
Trade setup score
Overall entry quality combining R/R ratio, trend alignment, and entry zone. 8–10 = high conviction long. 5–7 = proceed cautiously. Below 5 = wait or avoid entirely.
Overall score
Average of all 11 dimension scores. Above 7 = favorable setup. 5–7 = proceed cautiously. Below 5 = wait for better conditions. Use as a go/no-go gauge — not a guarantee.
Trend direction score
Rates the strength and clarity of trend on Daily and 1H charts. Strong uptrend with higher highs/lows on both timeframes = 9–10. Mixed or consolidating = 5. Downtrend = 1–3.
Outlook score
Rates the 3–10 day expected scenario quality. Strong bullish catalyst + clear path to target = 8–10. Uncertain macro backdrop = 5. Bearish macro + sector weakness = 2–4.
Step 01 — Input
You enter a ticker
JavaScript validates: ticker must match /^[A-Z]{1,6}$/, API key must match /^sk-ant-[A-Za-z0-9\-_]{10,}$/. Nothing is sent until both pass. Invalid characters are stripped on each keystroke.
↓
Step 02 — Prompt
Ticker injected into the expert prompt
The validated ticker replaces [TICKER] in a pre-written prompt with 8 structured sections plus a 12-score block. This is prompt engineering — forcing consistent, machine-parseable output from the model.
↓
Step 03 — API call
Browser → api.anthropic.com only
POST to api.anthropic.com/v1/messages. CSP header restricts connect-src to Anthropic exclusively. No third-party scripts, no proxy, no data logging on any intermediary server.
↓
Step 04 — Inference
Claude generates 8 sections + 12 scores
claude-sonnet-4 reads the full structured prompt, applies domain knowledge about technical analysis, and outputs all 8 analysis sections followed by a SCORES block with 12 numeric 1–10 ratings.
↓
Step 05 — Render
Parse → grouped scorecard + cards
JavaScript extracts all 12 score values via regex, groups them into 4 themed sections (Trend, Bollinger, Structure, Risk), builds DOM nodes with textContent (no innerHTML — XSS-safe), colors bars green/amber/red.
What makes this an AI Agent pattern?
An AI Agent receives a role, a multi-step task, and a required output contract — then executes autonomously. Here Claude is briefed as “professional trader”, given 8 structured sections plus a 12-score format, and returns a complete trade brief with ratings. Same architecture as Cursor, Perplexity, and enterprise copilots — model has a job, context, and output format. No memory or tool calls needed for this single-call agentic pattern.
Three prompt engineering techniques: role injection, numbered sections (parseable), and constrained score format (12 labeled scores make automated rendering trivial).
Act as a professional trader · Analyze [TICKER] for LONG position
Sections 1–8: Trend · Bollinger · Key Levels · ATR
Volume · Catalysts · Trade Plan · Outlook
Verdict: “Good entry now” | “Wait for pullback to $___” | “Avoid — reason”
SCORES (1–10):
Trend Direction · RSI · Bollinger Position · Bollinger Volatility
Breakout vs Pullback · Volume Confirmation · Key Levels · ATR Risk
Catalyst · Trade Setup · Outlook · Overall
Why 12 scores instead of 8? The original 8 sections map to broad categories. The 4 new sub-scores — RSI, Bollinger Position, Bollinger Volatility, Breakout vs Pullback, Volume Confirmation — give you granular signal within the two most action-relevant sections (momentum and structure). A Bollinger section that says “near upper band, volatility expanding” is very different from “near lower band, bands squeezing” — the two sub-scores make that distinction visible at a glance.
Summary
Key takeaways
🧠
Prompt structure is everything
Numbered sections with sub-questions force structured expert reasoning. The 12-score format makes automation trivial. This is the most important applied AI skill.
📊
Sub-scores reveal nuance
Bollinger Position and Bollinger Volatility tell different stories. RSI at 68 vs RSI at 45 have opposite implications. Granular scores surface signal that section-level summaries hide.
🔒
Security by design
Input validation, textContent rendering (no XSS), CSP restricting connections to Anthropic only, and zero third-party scripts — non-negotiable even for educational tools.
⚠️
Always verify the live price
Claude has a training cutoff. Treat output as a structured checklist to verify against your live chart — not a Bloomberg terminal substitute or a trading signal.
🤖
One prompt can be an agent
No LangChain, no pipelines. Encoding role + 8-step task + 12-score output contract into a single prompt is the same architecture behind most real-world copilots.
🏗️
The foundation to extend
Add a live market data API (Polygon.io), brokerage execution (Alpaca), and persistent watchlist storage — this prompt + parse + render architecture scales directly.
Interview Prep
Cheat sheet — quick definitions
Define
What does the Bollinger Position score measure?
It rates where price sits relative to the three Bollinger Band lines. Near the lower band = high score (potential discount entry, mean reversion likely). Near the upper band = low score (extended, overbought risk). At the 20-day MA middle band = neutral 5. The Volatility score is separate — it rates whether the bands are expanding (breakout possible) or squeezing (setup forming).
Lower band = high scoreUpper band = low scoreSeparate from volatility
Define
What does the RSI score represent and what are the thresholds?
The RSI score translates the raw RSI reading into a 1–10 entry quality rating. RSI 30–45 bouncing upward = 8–9 (oversold recovery). RSI 45–60 in neutral zone = 5–6. RSI 65–70 approaching overbought = 3–4. RSI above 70 = 1–2 (caution, extended). RSI divergence — price making new high but RSI declining — overrides the raw number and caps the score at 3.
30–45 = 8–945–60 = 5–670+ = 1–2
Compare
Breakout vs pullback score — how does each scenario score?
A clean pullback to tested support in an established uptrend scores 8–9: your stop is tight, target is far, R/R is excellent. A fresh breakout above resistance with strong volume scores 7–8 if volume confirms. Chasing a breakout that has already extended 5%+ from the breakout level scores 3–4: your stop must be wide, R/R deteriorates. A range-bound setup with no clear directional bias scores 5.
Pullback to support = 8–9Fresh breakout = 7–8Chasing = 3–4
Define
What does Volume Confirmation score measure?
It rates whether volume behavior supports the trade thesis. Declining volume on a pullback = bullish (sellers are exhausted, healthy retracement) → score 8–9. Rising volume on a breakout = conviction confirmed → score 8–9. Rising volume on a down day during a pullback = distribution risk → score 3–4. Low volume across all bars = no conviction either way → score 5.
Why can’t you blindly trust Claude’s specific price levels?
Claude has a training data cutoff — it does not see live ticks, real-time order books, or today’s chart. Price levels ($105, $112, etc.) are approximations from training patterns, not live market data. Always cross-reference every specific price level against your live charting platform before acting. Use the analysis as a structured reasoning checklist — not a Bloomberg terminal substitute.
Training cutoff ≠ live dataVerify all price levelsFramework, not signal
Weakness
What are the three hard limits of this tool?
(1) No live data — cannot see today’s candles, volume profile, or order flow; (2) No execution — cannot place orders, set broker alerts, or connect to a trading platform; (3) Stateless — no memory between sessions, no watchlist persistence. To extend: add Polygon.io for live prices, Alpaca for execution, and localStorage or a backend for watchlist persistence.
GenAI Mastery Series · Agentic AI · Flowise Walkthrough Building an AI Storytelling Agent with Flowise — No Code Required StackFlowise · OpenAI GPT-4...