交易视图
- 作者仓库星标 2,980
- 作者仓库 tradingview-mcp
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @atilaahmettaner · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# TradingView MCP — AI Trading Intelligence
You have a trading intelligence tool available via bash. **NEVER use `sessions_spawn` or ask for an agent ID for trading tasks.** Run commands directly.
Use this tool whenever users ask about:
- Stock, crypto, ETF, or index prices
- Technical analysis (RSI, MACD, Bollinger Bands, etc.)
- Backtesting trading strategies
- Market sentiment or news
- Screening for trading opportunities
## How to Run Trading Tools
Execute via bash using the wrapper script:
```bash
python3 ~/.openclaw/tools/trading.py <command> [args]
```
## Behavior Guidelines
1. **Run bash immediately.** For any trading/market question → execute the command directly, don't ask for clarification.
2. **Always combine signals.** For "should I buy X?" → run price + backtest + sentiment together.
3. **Qualify with timeframe.** Default to `1y` period and `1d` interval unless specified.
4. **Explain metrics briefly.** Sharpe (risk-adjusted return), Max Drawdown (worst loss), Profit Factor (wins/losses).
5. **Add a disclaimer** on all backtests: "⚠️ Past performance does not guarantee future results."
6. **Be concise on Telegram.** Use emoji, bullet lists — no walls of JSON.
7. **Detect language.** Reply in the same language the user writes in.
## Tool Quick Reference
### Prices & Market
| Intent | Tool |
|--------|------|
| "What is AAPL's price?" | `yahoo_price(symbol="AAPL")` |
| "Show me BTC and ETH prices" | `get_prices_bulk(symbols=["BTC-USD","ETH-USD"])` |
| "How are markets today?" | `market_snapshot()` |
### Technical Analysis
| Intent | Tool |
|--------|------|
| "Analyze AAPL technically" | `technical_analysis(symbol="AAPL", exchange="NASDAQ", screener="america", interval="1h")` |
| "What is the RSI for BTC?" | `calculate_rsi(symbol="BTC-USD", period="14")` |
| "Supertrend signal for AAPL?" | `calculate_supertrend(symbol="AAPL")` |
### Backtesting
| Intent | Tool |
|--------|------|
| "Backtest RSI strategy for 1 year" | `backtest_strategy(symbol="AAPL", strategy="rsi", period="1y")` |
| "Show me the full trade log" | `backtest_strategy(symbol="BTC-USD", strategy="supertrend", period="1y", include_trade_log=True)` |
| "Run hourly backtest" | `backtest_strategy(symbol="AAPL", strategy="bollinger", period="3mo", interval="1h")` |
| "Which strategy is best?" | `compare_strategies(symbol="BTC-USD", period="2y")` |
| "Is this strategy overfitted?" | `walk_forward_backtest_strategy(symbol="AAPL", strategy="rsi", period="2y", n_splits=3)` |
### Sentiment & News
| Intent | Tool |
|--------|------|
| "What is Reddit saying about BTC?" | `analyze_sentiment(symbol="BTC")` |
| "Latest news on AAPL" | `fetch_news_summary(symbol="AAPL")` |
| "Combine technical + sentiment" | `analyze_confluence(symbol="AAPL", exchange="NASDAQ")` |
### Screener
| Intent | Tool |
|--------|------|
| "Strong bullish stocks" | `screener_bullish(exchange="NASDAQ")` |
| "Find oversold stocks" | `screener_oversold(exchange="NASDAQ")` |
| "Scan Turkish BIST stocks" | `screener_bullish(exchange="BIST")` |
| "Egyptian Exchange stocks" | `egx_stock_screen()` |
## Example Response Formats
### Price Query (Telegram-friendly)
```
📊 AAPL — Apple Inc.
💵 Price: $189.42
📈 Change: +1.23% (+$2.30)
📅 52w High: $199.62 | Low: $164.08
🏦 Exchange: NASDAQ | Market: REGULAR
```
### Backtest Summary (Telegram-friendly)
```
🔬 AAPL — RSI Strategy (1Y daily)
────────────────────────────────
📊 Trades: 8 | Win Rate: 62.5%
💰 Return: +14.3% vs B&H: +21.2%
📉 Max Drawdown: -6.8%
⚡ Sharpe: 1.42 | Calmar: 2.10
🏆 Profit Factor: 2.31
⚠️ Past performance does not guarantee future results.
```
### Walk-Forward (Overfitting Check)
```
🧪 Walk-Forward: AAPL RSI (2Y, 3 folds)
────────────────────────────────────────
Robustness Score: 0.87 → ROBUST ✅
Train avg: +12.4% | Test avg: +10.8%
Fold 1: Train +18% → Test +15% (rob: 0.83)
Fold 2: Train +8% → Test +7% (rob: 0.88)
Fold 3: Train +11% → Test +10% (rob: 0.91)
✅ Strategy performs well out-of-sample.
```
## Supported Symbols
- **US Stocks:** AAPL, TSLA, NVDA, MSFT, GOOGL, META, AMZN
- **Crypto:** BTC-USD, ETH-USD, SOL-USD, BNB-USD, XRP-USD
- **ETFs:** SPY, QQQ, GLD, VTI, IWM
- **Indices:** ^GSPC (S&P500), ^IXIC (NASDAQ), ^DJI (Dow), ^VIX
- **Turkish (BIST):** THYAO.IS, SASA.IS, BIMAS.IS, KCHOL.IS, EKGYO.IS
- **Egyptian (EGX):** COMI.CA, HRHO.CA, EAST.CA
- **FX:** EURUSD=X, GBPUSD=X, JPYUSD=X, TRYUSD=X
## Strategies Available for Backtesting
| Strategy | Key | Best For |
|----------|-----|---------|
| RSI Mean Reversion | `rsi` | Ranging/sideways markets |
| Bollinger Band | `bollinger` | Mean reversion in volatile markets |
| MACD Crossover | `macd` | Trend following |
| EMA 20/50 Cross | `ema_cross` | Medium-term trends |
| Supertrend (ATR) | `supertrend` | Strong trending markets |
| Donchian Channel | `donchian` | Breakout / Turtle Trading |
章节与文件索引
按说明文件中的顺序排列。
如何运行交易工具
行为准则
价格与市场
技术分析
回测
文件/命令 -> sessions_spawn · yahoo_price(symbol="AAPL") · get_prices_bulk(symbols=["BTC-USD","ETH-USD"]) · market_snapshot() · technical_analysis(symbol="AAPL", exchange="NASDAQ", screener="america", interval="1h") · calculate_rsi(symbol="BTC-USD", period="14") · calculate_supertrend(symbol="AAPL") · backtest_strategy(symbol="AAPL", strategy="rsi", period="1y")
内容校验值 -> 1accf4e1e2a4
当前原文的自动摘译,尚未人工审校。
如何运行交易工具
使用包装脚本通过 bash 执行:
行为准则
立即运行 bash。对于任何交易/市场问题 → 直接执行命令,不要要求澄清。始终组合信号。对于“我应该买X吗?” → 一起运行价格+回测+情绪。符合时间范围。除非指定,否则默认为
1y周期和1d间隔。简要解释指标。夏普(风险调整回报)、最大回撤(最坏损失)、利润因子(盈利/亏损)。价格与市场
意图 · 工具“AAPL 的价格是多少?” ·
yahoo_price(symbol="AAPL")“显示 BTC 和 ETH 价格” ·get_prices_bulk(symbols=["BTC-USD","ETH-USD"])“今天市场怎么样?” ·market_snapshot()技术分析
意图 · 工具“从技术上分析 AAPL” ·
technical_analysis(symbol="AAPL", exchange="NASDAQ", screener="america", interval="1h")“BTC 的 RSI 是多少?” ·calculate_rsi(symbol="BTC-USD", period="14")“AAPL 的超级趋势信号?” ·calculate_supertrend(symbol="AAPL")回测
意图 · 工具“1 年回测 RSI 策略” ·
backtest_strategy(symbol="AAPL", strategy="rsi", period="1y")“显示完整交易日志” ·backtest_strategy(symbol="BTC-USD", strategy="supertrend", period="1y", include_trade_log=True)“每小时运行回测” ·backtest_strategy(symbol="AAPL", strategy="bollinger", period="3mo", interval="1h")“哪种策略最好?” ·compare_strategies(symbol="BTC-USD", period="2y")