用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/richfrem/InvestmentToolkit --skill tv-ta-daily-sweep命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Perform autonomous stock valuation for a ticker you already hold or track -- the "augment/update an existing stake's analysis" counterpart to stock-intake (which is for net-new tickers). Produces a Projection object saved to backend/data/projections/{TICKER}.json AND a deep-dive research report saved to backend/data/research/{TICKER}_{DATE}.md. Summarizes findings conversationally and supports interactive Q&A. Trigger when user asks to value, analyse, re-evaluate, or price a stock, or uses /update-stock-analysis (primary), /evaluate-stock (alias), or /perform-stock-valuation (alias). Renamed 2026-08-28 from stock_valuation -- see docs/architecture/skill-renames-2026-08-28.md for the full old->new mapping.
Autonomous end-to-end stock intake & onboarding wizard designed for non-expert investors. Pulls live financials, conducts plain-English educational walkthroughs, queries TradingView CDP Data Window for technical levels (1D/1W), injects visual action tier lines on the chart, runs a 5-year scenario DCF model, logs research in intelligence.sqlite, and registers the stock into domain_model.sqlite under its designated strategy pillar. Trigger with /stock-intake {TICKER} or "onboard {TICKER}".
Perform autonomous ETF and fund analysis. Handles three fund types: CLOSED_END (NAV premium analysis, private holdings), THEMATIC_ETF (holdings composition, thesis alignment score), and CASH_FUND (yield, dividend timing). Saves structured JSON to backend/data/etf_analysis/{TICKER}.json and updates agentRationale in target-portfolio.json. Trigger on /analyze-etf or natural language: "analyze [TICKER]", "evaluate [TICKER] ETF".
正在显示 SKILL.md
| name | tv-ta-daily-sweep |
| plugin | tradingview |
| description | Batch daily Technical Analysis sweep across all holdings. |
| allowed-tools | Bash, Read |
/ta-daily-sweep or /portfolio-scan
Batch technical analysis scan of all current portfolio holdings via TradingView CDP. For each holding, reads the Data Window (RSI, Vol Bias, ADX, Squeeze, Volume) in one CDP session — no screenshots, all numeric. Cross-references DCF projections and target-portfolio.json for thesis context. Outputs a ranked daily report with actionable flags: abnormal volume, momentum extremes, squeeze setups, distribution patterns, and DCF fair value proximity.
Complements /x-news-sweep (fundamental/news lens) with a pure technical lens.
Run both at the start of a session for a full picture.
python3 "$(find plugins/tradingview/scripts ~/.claude/plugins/cache -name tv_health_check.py -path "*/tradingview/*" 2>/dev/null | sort | tail -1)" --json
If TradingView is NOT connected:
TradingView Desktop not detected. The TA sweep requires TradingView running on port 9222.
Launch: python3 launch_tradingview_with_debugport.py
Stop if unhealthy.
Confirm both data files exist before running:
investment_screener/backend/data/portfolio.json — current holdingsinvestment_screener/backend/data/theses/target-portfolio.json — thesis/targetsIf portfolio.json is stale (last_updated > 24h), suggest running /tv-portfolio-sync first.
python3 plugins/tradingview/scripts/ta_sweep_batch.py 2>&1
This will:
portfolio.json (skips PSU.U.TO, USD_CASH)Expected runtime: ~4s per ticker. For 29 equity holdings: ~2 minutes.
Show the user: "Scanning 29 holdings... (~2 minutes)" before running.
The script reports progress to stderr: [1/29] APLD, [2/29] BE, etc.
The JSON output is an array of objects:
{
"ticker": "COIN",
"close": 285.40,
"changePct": 3.8,
"rsi": 73.2,
"rsima": 68.1,
"volBias": -62.4,
"adx": 28.3,
"squeezeOn": false,
"vol": 18400000,
"volMA": 9200000,
"volumeRatio": 2.0,
"flags": ["RSI_OB", "DIST_SIGNAL", "VOLUME_SPIKE"],
"action": "REDUCE",
Sort by: flag count descending (most flagged = most urgent to review). Action priority: REDUCE > MONITOR > ACCUMULATE > HOLD.
Output a structured two-section report:
For each holding with flags, write a short analysis line (1-2 sentences) explaining:
Format each as:
🔴 REDUCE COIN RSI 73.2 (OB) + Vol Bias -62% (DIST) + 2× volume spike
Consider trimming — distribution into strength. DCF fair value $312 (9% away).
Thesis says ACCUMULATE but technical setup is working against you short-term.
🟡 MONITOR SNDK DIST_SIGNAL + VOLUME_DRY on +5.3% day
Big up day on below-average volume suggests weak conviction breakout.
Wait for RSI > 70 + above-avg volume before adding. GTC entry $1,350.
🟢 ACCUM APLD RSI 28.1 (oversold) + DEEP_VALUE (40% below fair value)
Technical oversold at fundamental value zone — high-conviction accumulate.
Confirm: is this a sector sell-off or thesis-specific risk?
Emoji guide:
TICKER PRICE DAY% RSI ADX VBIAS V/MA SQZ ACTION
──────────────────────────────────────────────────────────────────
APLD 40.95 +2.1% 62.3 28.4 +12% 1.3× — HOLD
BE 14.20 -1.2% 41.2 18.3 -22% 0.9× — HOLD
...
Columns:
SWEEP SUMMARY — {DATE} — {N} holdings scanned
Action breakdown: {X} REDUCE | {Y} MONITOR | {Z} ACCUMULATE | {W} HOLD
Top flags: DIST_SIGNAL (N), RSI_OB (N), VOLUME_SPIKE (N)
Time to scan: ~{T} seconds
Data Window source: AI-TA (RSI, Vol Bias, ADX, Squeeze) + TV OHLCV
| Flag | Condition | Implication |
|---|---|---|
RSI_OB | RSI > 72 | Overbought — watch for fade or fade confirmation |
RSI_OS | RSI < 30 | Oversold — potential entry if thesis intact |
RSI_COOLING | RSI < RSI-MA and RSI-MA > 62 | Momentum fading after hot run |
ADX_STRONG | ADX > 30 | Trend confirmed — let it ride, tight stop |
ADX_WEAK | ADX < 20 | Ranging — mean-reversion likely, fade breakouts |
SQUEEZE_ON | Squeeze = 1 | Compression — big directional move coming |
DIST_SIGNAL | Vol Bias < -50% | Down-volume dominating — distribution |
ACCUM_SIGNAL | Vol Bias > +50% | Up-volume dominating — accumulation |
VOLUME_SPIKE | Vol > 1.8× MA | Institutional activity — direction matters |
VOLUME_DRY | Vol < 0.5× MA AND move > 2% | Weak-hand move — don't chase |
BIG_DAY | |daily%| > 4% | Outsized move — confirm direction with volume |
NEAR_FV | Price within 5% of DCF fair value | Approaching trim zone |
ABOVE_FV | Price > DCF fair value | Above intrinsic — reduce |
DEEP_VALUE | Price > 25% below DCF fair value | High-conviction accumulate zone |
AT_BUY_TIER_N | Price within 2% below buyTier[N].price | Limit order zone — accumulate |
AT_SELL_TIER_N | Price within 2% below sellTier[N].price | Prepare tier trim limit order |
ABOVE_SELL_TIER_N | Price above sellTier[N].price | Tier triggered — confirm trim executed |
AT_STOP_LOSS |
| Flags present | Derived Action |
|---|---|
RSI_OS | ACCUMULATE |
ACCUM_SIGNAL + DEEP_VALUE | ACCUMULATE |
AT_BUY_TIER_N | ACCUMULATE — tier approaching, consider GTC limit |
ABOVE_FV | REDUCE |
ABOVE_SELL_TIER_N | REDUCE — confirm tier trim was executed |
RSI_OB + (NEAR_FV or DIST_SIGNAL) | REDUCE |
AT_SELL_TIER_N | MONITOR — prepare trim limit order at tier price |
AT_STOP_LOSS | MONITOR — thesis breaker approaching, review thesis urgently |
BELOW_STOP_LOSS | REDUCE/EXIT — thesis breaker triggered |
DIST_SIGNAL + VOLUME_DRY | MONITOR |
VOLUME_SPIKE or BIG_DAY | MONITOR |
SQUEEZE_ON | MONITOR |
| Default | HOLD |
Important: targetAction from thesis may conflict with the derived TA action.
When they conflict, note the conflict explicitly — e.g., "Thesis says BUY but TA
says REDUCE — wait for RSI to cool before adding."
After the TA sweep (Phase 2–3), read priceLevelSnapshot from portfolio.json for
each holding and merge tier proximity flags into the output:
import json
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[5] # adjust for install path
portfolio_path = REPO_ROOT / 'investment_screener/backend/data/portfolio.json'
with open(portfolio_path) as f:
portfolio = json.load(f)
for holding in portfolio.get('holdings', []):
snapshot = holding.get('priceLevelSnapshot', {})
flags = snapshot.get('proximityFlags', [])
# Merge into the ticker's flag list for reporting
ticker_flags[holding['symbol']].extend(flags)
If a holding's priceLevelSnapshot has tier flags, include them in the action card:
🟠 MONITOR GOOG AT_SELL_TIER_1 ($518 target, 1.4% away)
Sell Tier 1 approaching: 30% trim at $518 (DCF base FV).
TA: RSI 65 — momentum supporting trim signal.
Suggested: place limit sell at $518 (30% of position).
Hard rule: Tier proximity flags from priceLevelSnapshot are informational —
do not auto-execute. Always surface for user review in the action card.
| Script | Purpose |
|---|---|
plugins/tradingview/scripts/ta_sweep_batch.py | Python orchestrator — reads portfolio, calls CDP sweep, enriches with DCF |
tradingview-cdp/core/sweep.js | Node.js CDP scan engine — symbol switching + Data Window reads |
tradingview-cdp/cli.js sweep --tickers A,B,C | Direct CLI access to sweep engine |
| Price within 3% above stopLoss.price |
| Thesis breaker approaching — review urgently |
BELOW_STOP_LOSS | Price below stopLoss.price | ⚠️ Thesis breaker triggered — escalate to EXIT review |