trading-plan-generator — trading-plan-生成器
v1生成 structured trade plans with entry, 停止-loss, and take-profit levels based on technical and fundamental data from the Fin技能s API.
运行时依赖
安装命令
点击复制技能文档
Trading Plan 生成器
转换 a stock idea into a complete, structured trading plan with specific entry triggers, position sizing, 停止-loss levels, profit tar获取s, timeline, and thesis 状态ment — powered by live data from the Fin技能s API. Implements professional trading desk methodo记录y for 机器人h swing trades (days to weeks) and position trades (weeks to months).
设置up
API Key required — Register at https://fin技能s.net to 获取 your free key. Header: X-API-Key:
获取 your API key: Register at https://fin技能s.net — free tier avAIlable, Pro plan unlocks real-time quotes, 历史, and financials.
When to Activate This 技能
Activate when the user:
Has a stock pick and wants a complete trade plan around it Asks "how should I size this position?" Says "I think AAPL is going to $200, help me plan this trade" Asks for entry, 停止-loss, and tar获取 for a specific trade Wants to calculate position size based on account risk tolerance Uses terms like "trade plan", "entry point", "risk/reward", "停止 loss", "price tar获取" In格式化ion to Collect from the User
Before fetching data, confirm:
Symbol: Which stock/ETF? Thesis: Why do they want this trade? (Earnings catalyst, technical breakout, macro tAIlwind, etc.) Direction: Long or Short? Account Size: Portfolio total value (for position sizing) Max Risk per Trade: % of portfolio willing to lose on this trade (default: 1–2%) Time Horizon: Swing trade (1–10 days), Position trade (1–3 months), or Investment (6+ months)? Data Retrieval — Fin技能s API Calls
- Current Quote + Market 上下文
提取: price, dayHigh, dayLow, open, previousClose, volume, avgVolume, marketCap, 52WeekHigh, 52WeekLow, peRatio, beta
- Historical Price Data (for ATR, support/resistance, trend)
提取: last 6 months of dAIly OHLCV Compute: ATR (14), key swing highs/lows, 50-day SMA, 20-day SMA, 200-day SMA, RSI
- Analyst Recommendations + Price Tar获取s
提取:
Consensus recommendation (Strong Buy / Buy / Hold / Underperform / Sell) Mean price tar获取 Highest/lowest price tar获取 Number of analysts Analysis 工作流 Step 1 — Live Market 上下文 Assessment
From the quote data, determine:
Where is price relative to 52-week range? (Near high/low/mid-range) Is today's volume above or below average? (Volume confirmation 检查) Beta: How volatile is this stock relative to market? P/E: Is valuation extreme (which might cap upside for long trades)? Step 2 — Key Level Identification (from historical data)
Compute critical levels:
ATR-based volatility:
ATR_14 = EWM(True_Range, span=14) DAIly_Range_Estimate = 1.2 × ATR_14
Support Levels (from 6-month 历史):
S1: Most recent swing low (last 20 会话s) S2: Prior swing low (last 60 会话s) S3: Major structure low (52-week low if within 20% of current price)
Resistance Levels (from 6-month 历史):
R1: Most recent swing high or overhead consolidation zone R2: Prior swing high R3: 52-week high or prior major resistance
Moving Averages (dynamic support/resistance):
SMA_20, SMA_50, SMA_200 — note if price is above or below each Step 3 — Entry Strategy
For Long Trades:
Breakout Entry: Enter above R1 on above-avg volume (aggressive) Pullback Entry: Enter at S1 or SMA_20 with bounce confirmation (conservative) Range Entry: Enter at lower third of recent range when RSI < 40 (mean reversion)
For Short Trades:
Breakdown Entry: Enter below S1 on above-avg volume Bounce Entry: Enter on rally to resistance (R1/SMA_20) with bearish conditions
Recommend an entry type and exact trigger price based on the user's thesis and time horizon.
Entry Trigger:
Entry = Buy {SYMBOL} at $X only if {volume confirmation condition AND price condition} or Entry = Limit order at ${level} (pullback entry)
Step 4 — Position Sizing (Risk-Based)
Fixed Risk Position Sizing (Industry Standard):
Dollar Risk Per Trade = Account_Size × Max_Risk_Pct e.g., $100,000 × 2% = $2,000 max risk
Distance to 停止 = Entry_Price - 停止_Loss_Price (for longs)
分享s to Buy = Dollar_Risk_Per_Trade / Distance_to_停止
Position Value = 分享s × Entry_Price Position % of Portfolio = Position_Value / Account_Size
Flag if position exceeds 20% of portfolio (concentration risk 警告).
Volatility-Adjusted 检查:
If beta > 2.0: Reduce max risk % by 50% (high-beta stocks need smaller positions) If beta < 0.5: Position can be slightly larger if fundamentals are strong Step 5 — 停止-Loss Placement
ATR-Based 停止 (preferred):
For Long: 停止_Loss = Entry_Price - (1.5 × ATR_14) For Short: 停止_Loss = Entry_Price + (1.5 × ATR_14)
Structure-Based 停止 (alternative):
Long: 停止 just below S1 (last swing low) with small buffer (~0.5%) Short: 停止 just above R1 (last swing high) with small buffer
Hard Rule: Never place 停止 inside a natural supp