Agent Skills › tradesdontlie/tradingview-mcp

tradesdontlie/tradingview-mcp

GitHub

用于执行TradingView图表技术分析。涵盖设置交易对与周期、添加指标、导航关键日期、绘制标注、截图及数据获取,最终提供包含价格、支撑阻力、指标信号及趋势判断的综合分析报告。

5 skills 4,172

Install All Skills

npx skills add tradesdontlie/tradingview-mcp --all -g -y
More Options

List skills in collection

npx skills add tradesdontlie/tradingview-mcp --list

Skills in Collection (5)

用于执行TradingView图表技术分析。涵盖设置交易对与周期、添加指标、导航关键日期、绘制标注、截图及数据获取,最终提供包含价格、支撑阻力、指标信号及趋势判断的综合分析报告。
用户请求进行技术分析 用户要求审查或解读图表
skills/chart-analysis/SKILL.md
npx skills add tradesdontlie/tradingview-mcp --skill chart-analysis -g -y
SKILL.md
Frontmatter
{
    "name": "chart-analysis",
    "description": "Analyze a chart — set up symbol\/timeframe, add indicators, scroll to key dates, annotate, and screenshot. Use when the user wants technical analysis or chart review."
}

Chart Analysis Workflow

You are performing technical analysis on a TradingView chart.

Step 1: Set Up the Chart

  1. chart_set_symbol — switch to the requested symbol
  2. chart_set_timeframe — set the appropriate timeframe
  3. Wait for the chart to load (the tool handles this)

Step 2: Add Indicators

Use chart_manage_indicator to add studies. Common names (must use FULL names):

  • "Relative Strength Index" (not RSI)
  • "Moving Average Exponential" (not EMA)
  • "Moving Average" (for SMA)
  • "MACD"
  • "Bollinger Bands"
  • "Volume"
  • "VWAP"
  • "Average True Range"

After adding, use indicator_set_inputs to customize settings (e.g., change EMA length to 200).

Step 3: Navigate to Key Areas

  • chart_scroll_to_date — jump to a specific date of interest
  • chart_set_visible_range — zoom to a specific date window
  • chart_get_visible_range — check what's currently visible

Step 4: Annotate

Use drawing tools to mark up the chart:

  • draw_shape with horizontal_line for support/resistance
  • draw_shape with trend_line for trend channels (needs two points)
  • draw_shape with text for annotations

Step 5: Capture and Analyze

  1. capture_screenshot — screenshot the annotated chart
  2. data_get_ohlcv — pull recent price data for quantitative analysis
  3. quote_get — get the current real-time price
  4. symbol_info — get symbol metadata (exchange, type, session)

Step 6: Report

Provide the analysis:

  • Current price and recent range
  • Key support/resistance levels identified
  • Indicator readings (RSI overbought/oversold, MACD crossover, etc.)
  • Overall bias (bullish/bearish/neutral) with reasoning

Cleanup

If you added indicators the user didn't ask for, remove them:

  • chart_manage_indicator with action "remove" and the entity_id
  • draw_clear to remove all drawings if they were temporary
用于扫描多个交易品种以寻找入场信号、识别技术形态或对比策略表现。支持批量获取策略结果、截图对比及自定义指标分析,并能整合用户自选股列表进行统一筛选和排序报告。
需要同时分析多个股票或期货品种的走势 比较不同交易品种的策略回测表现 在自选股列表中快速筛选潜在交易机会
skills/multi-symbol-scan/SKILL.md
npx skills add tradesdontlie/tradingview-mcp --skill multi-symbol-scan -g -y
SKILL.md
Frontmatter
{
    "name": "multi-symbol-scan",
    "description": "Scan multiple symbols for setups, patterns, or strategy performance. Use when comparing across instruments or screening for opportunities."
}

Multi-Symbol Scanner

You are scanning multiple symbols for trading setups or comparing performance.

Step 1: Define the Scan

Determine:

  • Symbols: Which instruments to scan (user-provided or watchlist via watchlist_get)
  • Timeframe: Which timeframe to analyze
  • Criteria: What to look for (indicator values, strategy results, visual patterns)

Step 2: Run the Scan

For Strategy Performance Comparison

Use batch_run with action get_strategy_results:

symbols: ["ES1!", "NQ1!", "YM1!", "RTY1!"]
timeframes: ["15"]
action: "get_strategy_results"

For Screenshot Comparison

Use batch_run with action screenshot:

symbols: ["AAPL", "MSFT", "GOOGL", "AMZN"]
timeframes: ["D"]
action: "screenshot"

For Custom Analysis (per-symbol)

Loop through symbols manually:

  1. chart_set_symbol + chart_set_timeframe
  2. chart_manage_indicator — add the study
  3. data_get_ohlcv — pull price data
  4. data_get_indicator — read indicator values
  5. Analyze and record findings

Step 3: Compile Results

Build a comparison table:

Symbol Key Metric 1 Key Metric 2 Signal

Sort by the most relevant metric.

Step 4: Report

Present findings:

  • Ranked list of symbols by the scan criteria
  • Highlight the strongest setups
  • Note any divergences or anomalies
  • Screenshot the top 1-2 charts for visual confirmation

Watchlist Integration

To scan the user's watchlist:

  1. watchlist_get — read all symbols
  2. Use the symbol list for the scan
  3. watchlist_add — add new finds to the watchlist
自动化Pine Script开发流程,涵盖从需求确认、代码编写、编译调试到图表验证的完整闭环。支持指标和策略开发,通过脚本自动推送至TradingView编辑器并处理错误,确保代码零报错后截图反馈结果。
需要编写或修改TradingView Pine Script指标/策略 遇到Pine Script编译错误需要修复 验证交易策略在图表上的表现
skills/pine-develop/SKILL.md
npx skills add tradesdontlie/tradingview-mcp --skill pine-develop -g -y
SKILL.md
Frontmatter
{
    "name": "pine-develop",
    "description": "Full Pine Script development loop — write code, compile, fix errors, iterate. Use when building a new indicator or strategy in TradingView."
}

Pine Script Development Loop

You are developing a Pine Script indicator or strategy in TradingView. Follow this loop precisely.

Step 1: Understand the Goal

If not already clear, ask the user:

  • What type? (indicator, strategy, library)
  • What does it do? (entry/exit logic, overlay, oscillator, etc.)
  • Overlay or separate pane?
  • Any specific inputs or visual elements?

Step 2: Pull Current Source (if modifying)

If modifying an existing script:

node scripts/pine_pull.js

Then read scripts/current.pine to understand what's there.

If creating new: start from scratch.

Step 3: Write the Pine Script

Write the complete script to scripts/current.pine. Every script MUST include:

  • //@version=6 header
  • Proper indicator() or strategy() declaration
  • All user inputs with input.*() functions and groups
  • Clear comments for each logical section

For strategies, include:

  • strategy.entry() and strategy.exit() calls
  • Position sizing via strategy() declaration
  • Default commission and slippage settings

Step 4: Push and Compile

node scripts/pine_push.js

This injects the code into TradingView's Pine Editor, clicks compile, and reports any errors.

Step 5: Fix Errors

If errors are reported:

  1. Read the error messages (line number + description)
  2. Edit scripts/current.pine locally — fix the specific lines
  3. Push again: node scripts/pine_push.js
  4. Repeat until 0 errors

Common Pine Script errors:

  • "Mismatched input" — usually indentation (Pine uses 4-space indentation, not braces)
  • "Could not find function or function reference" — typo in function name or wrong version
  • "Undeclared identifier" — variable used before declaration
  • "Cannot call X with argument type Y" — wrong parameter type

Step 6: Verify on Chart

After clean compilation:

  1. capture_screenshot — take a screenshot to verify it looks right
  2. data_get_strategy_results — if it's a strategy, check performance
  3. Show the user the results

Step 7: Iterate

If the user wants changes:

  1. Pull fresh: node scripts/pine_pull.js (in case TV modified anything)
  2. Edit locally
  3. Push + compile
  4. Screenshot to verify

IMPORTANT: Always compile after every change. Never claim "done" without a clean compile.

指导用户在TradingView回放模式下进行模拟交易练习。通过逐步播放历史K线、执行买卖操作并跟踪盈亏,帮助用户手动复盘和验证交易策略,最终生成包含胜率与净盈亏的总结报告。
用户希望练习或回测交易策略 用户想在历史数据中模拟手动交易以评估表现
skills/replay-practice/SKILL.md
npx skills add tradesdontlie/tradingview-mcp --skill replay-practice -g -y
SKILL.md
Frontmatter
{
    "name": "replay-practice",
    "description": "Practice trading in TradingView replay mode — step through historical bars, take trades, track P&L. Use when the user wants to practice or backtest manually."
}

Replay Practice Trading

You are guiding the user through replay-mode practice trading on TradingView.

Step 1: Setup

  1. chart_set_symbol — set the desired symbol
  2. chart_set_timeframe — set the trading timeframe
  3. replay_start with a date — enter replay mode at the starting point

Step 2: Pre-Trade Analysis

Before stepping through bars:

  1. data_get_ohlcv — get the historical context leading up to the replay point
  2. Add any indicators the user wants: chart_manage_indicator
  3. capture_screenshot — show the starting chart state

Step 3: Step Through Bars

Use replay_step to advance one bar at a time, or replay_autoplay for continuous play.

After each significant move:

  1. replay_status — check current date, position, and P&L
  2. Announce what happened (breakout, support test, etc.)

Step 4: Execute Trades

When the user identifies an entry:

  • replay_trade with action "buy" or "sell"
  • replay_status to confirm the position was opened

When the user wants to exit:

  • replay_trade with action "close"
  • replay_status to show the P&L

Step 5: Review

After the practice session:

  1. replay_status — final P&L summary
  2. capture_screenshot — capture the final chart state
  3. replay_stop — exit replay mode

Report:

  • Total trades taken
  • Win/loss record
  • Net P&L
  • Key lessons from the session

Tips

  • Step through 5-10 bars at a time to find setups, then slow down for entry timing
  • Use replay_autoplay with speed control for faster scanning
  • Add drawings with draw_shape to mark entry/exit points for review
用于生成Pine Script策略的详细性能报告。通过收集指标、交易记录、权益曲线及图表截图,分析净盈亏、胜率等关键数据,评估策略表现并识别优缺点,最终输出结构化报告及具体优化建议。
需要生成策略回测性能报告 完成Pine Script策略回测后
skills/strategy-report/SKILL.md
npx skills add tradesdontlie/tradingview-mcp --skill strategy-report -g -y
SKILL.md
Frontmatter
{
    "name": "strategy-report",
    "description": "Generate a comprehensive strategy performance report — metrics, trade analysis, equity curve, and recommendations. Use after backtesting a Pine Script strategy."
}

Strategy Performance Report

You are generating a detailed performance report for a Pine Script strategy on TradingView.

Step 1: Gather Data

Collect all available performance data:

  1. data_get_strategy_results — overall metrics (net profit, win rate, profit factor, etc.)
  2. data_get_trades — individual trade list (max 20)
  3. data_get_equity — equity curve data points
  4. chart_get_state — current symbol, timeframe, and studies on chart
  5. symbol_info — symbol metadata for context

Step 2: Capture Visuals

  1. capture_screenshot with region "chart" — the chart with strategy overlay
  2. capture_screenshot with region "strategy_tester" — the Strategy Tester panel

Step 3: Analyze

Key Metrics

Report these if available:

  • Net Profit and % return
  • Total Trades and Win Rate
  • Profit Factor (target > 1.5)
  • Max Drawdown ($ and %)
  • Average Trade ($ and %)
  • Sharpe Ratio if available
  • Max Consecutive Losses

Trade Analysis

From the trade list:

  • Largest winner and largest loser
  • Average winner vs average loser (reward:risk)
  • Long vs short performance breakdown
  • Time in market

Equity Curve Assessment

  • Is it smooth and upward-sloping?
  • Any extended drawdown periods?
  • Does it show consistency or was profit front/back-loaded?

Step 4: Generate Report

Format as a structured report:

## Strategy Report: [Strategy Name]
**Symbol:** [symbol] | **Timeframe:** [tf] | **Period:** [date range]

### Summary
[1-2 sentence overview of performance]

### Key Metrics
| Metric | Value |
|--------|-------|
| Net Profit | ... |
| Win Rate | ... |
| Profit Factor | ... |
| Max Drawdown | ... |

### Strengths
- [bullet points]

### Weaknesses
- [bullet points]

### Recommendations
- [specific actionable improvements]

Step 5: Suggest Improvements

Based on the analysis:

  • If win rate < 50% but profit factor > 1: suggest tighter entries
  • If max drawdown > 20%: suggest position sizing or stop loss adjustments
  • If profit factor < 1.2: suggest the strategy may need fundamental changes
  • If few trades: suggest widening the lookback or loosening entry criteria

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 20:00
浙ICP备14020137号-1 $Carte des visiteurs$