tradingview-quantitative
hypier/tradingview-quantitative-skills · skills.sh
Open source Repository Open in the app JSON README (API)
About
Skill publicada por hypier/tradingview-quantitative-skills no skills.sh. Instale com: npx skills add hypier/tradingview-quantitative-skills@tradingview-quantitative
Details
- Kind
- Agent skills
- Topic
- No topic detected
- Publisher
- hypier
- Origin
- skillssh
- Category
- ferramentas
- Stars
- 15
- Forks
- 1
- Last push
- 2026-08-23T02:42:03Z
- Repository state
- ativo
- Added
- 2026-08-30 15:22:26
- Updated
- 2026-09-08 15:05:50
- Origin id
hypier/tradingview-quantitative-skills/tradingview-quantitative
README
# TradingView Quantitative Investment Analysis Skill
[English](README.md) | [简体中文](README.zh.md)
[](https://skills.sh/hypier/tradingview-quantitative-skills/tradingview-quantitative)
[](https://github.com/hypier/tradingview-quantitative-skills)
Professional quantitative investment analysis system based on TradingView data providing intelligent stock screening, technical pattern recognition, market review, risk management, and event-driven analysis.
## Installation
Install this skill with one command:
```bash
npx skills add hypier/tradingview-quantitative-skills
```
## Features
- ✅ **Smart Stock Screening** - Multi-factor comprehensive scoring, dual filtering of technical + fundamental aspects
- 📊 **Technical Pattern Recognition** - Automatically identify classic patterns, provide confidence assessment and trading strategies
- 📈 **Market Review** - Track hot sectors, capital flows, discover investment opportunities
- 🛡️ **Risk Management** - Position suggestions, stop-loss/take-profit, volatility analysis
- 📰 **Event-Driven Analysis** - Track earnings, policies, news, analyze market impact
- 🔍 **Deep Individual Stock Analysis** - Multi-timeframe technical analysis + fundamentals + news comprehensive evaluation
- 💰 **Fundamental Screening** - High dividend, low valuation, profitability screening
- 🔄 **Sector Rotation** - Identify strong sectors and rotation trends
- 🧾 **Fundamental Data Deep Dive** - Company profile, financial statements, dividends, analyst recommendations
- 🎯 **Advanced Screener Support** - Custom preset fields and filter-operator driven scans
- 📉 **Standard OHLCV** - Real Japanese candles for returns, stops, and backtests (`tradingview_get_ohlcv`)
- 📅 **Chart Events** - Earnings, dividend, and split markers (`tradingview_get_price_events`)
- 🌍 **Macro Dashboard** - World economy indicators, economic calendar, and macro news in one flow
- 💡 **Community Sentiment** - TradingView hot ideas, symbol minds, and crowd narrative tracking
## Quick Start
### 1. Configure MCP Server
Add the hosted TradingView MCP server to Cursor, VS Code, or Claude Desktop. The hosted server exposes 25 `tradingview_*` tools.
**Configuration file paths**:
- **Cursor**: `~/.cursor/mcp.json`
- **Claude Desktop (macOS)**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **VS Code**: MCP settings / server config JSON
> **📖 Security Notice**: Please read [SECURITY.md](SECURITY.md) for important information about API key management and data privacy.
#### Method 1: Console OAuth (Recommended)
Add the hosted URL. The first connection opens Console in the browser. Sign in and allow access. No JWT in the config file.
```json
{
"mcpServers": {
"tradingview": {
"type": "http",
"url": "https://mcp.tradingviewapi.com/mcp"
}
}
}
```
Older clients may use `"type": "streamable-http"` instead of `"http"`. The URL is the same.
**Configuration Steps**:
1. Visit https://console.tvapis.com/start and create an account
2. Use a plan that includes MCP (Basic for testing, Ultra or Mega for production; Pro does not include MCP)
3. Paste the config above
4. Start the server in the client and sign in when prompted
#### Method 2: Hosted MCP with a JWT (fallback)
Use this when the client cannot complete OAuth, when you are testing in a browser MCP tester, or when you subscribe on RapidAPI and want the official hosted `tradingview_*` tools.
> **⚠️ SECURITY WARNING**: Never commit your real API key or JWT token to version control. Keep them secure and private. The examples below use placeholders that you must replace.
**Step 1**: Generate an MCP JWT
Console:
```bash
curl --request POST \
--url https://api.tradingviewapi.com/api/mcp/generate \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY_HERE>' \
--data '{}'
```
RapidAPI:
```bash
curl --request POST \
--url https://tradingview-data1.p.rapidapi.com/api/mcp/generate \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tradingview-data1.p.rapidapi.com' \
--header 'x-rapidapi-key: <YOUR_RAPIDAPI_KEY_HERE>' \
--data '{}'
```
The response includes `exampleConfig` (`"type": "http"`, recommended for Cursor / VS Code) and `exampleConfigStreamableHttp` for older clients.
**Step 2**: Put the token in the hosted URL config
```json
{
"mcpServers": {
"tradingview": {
"type": "http",
"url": "https://mcp.tradingviewapi.com/mcp",
"headers": {
"Authorization": "Bearer <YOUR_JWT_TOKEN_HERE>",
"Accept": "application/json, text/event-stream"
}
}
}
}
```
#### Method 3: Local OpenAPI MCP for RapidAPI
This local `npx` server is for RapidAPI subscribers. It calls RapidAPI with your key and exposes OpenAPI tools. It is not the hosted TradingView MCP and does not use Console OAuth or the `tradingview_*` tool names.
> **⚠️ SECURITY WARNING**: Never commit your real API key to version control. Keep your API key secure and private.
```json
{
"mcpServers": {
"tradingview-data": {
"command": "npx",
"args": ["-y", "@ivotoby/openapi-mcp-server"],
"env": {
"API_BASE_URL": "https://tradingview-data1.p.rapidapi.com",
"OPENAPI_SPEC_PATH": "https://www.tradingviewapi.com/openapi.json",
"API_HEADERS": "x-rapidapi-host:tradingview-data1.p.rapidapi.com,x-rapidapi-key: <YOUR_RAPIDAPI_KEY_HERE>"
}
}
}
}
```
#### Recommended Configuration
For Cursor, VS Code, and Claude, **Method 1 (Console OAuth) is recommended** because:
- ✅ Only the hosted URL in the config file — no JWT to rotate
- ✅ Browser sign-in through Console, then automatic refresh
- ✅ Hosted `tradingview_*` tools at `mcp.tradingviewapi.com`
- ✅ JWT (Method 2) remains available for RapidAPI and clients without OAuth
- ✅ Local RapidAPI OpenAPI MCP (Method 3) remains available if you already subscribe there
### 2. Verify Installation
After restart, enter in conversation:
```
Please call tradingview_get_metadata to get the list of supported markets
```
If it returns the market list (america, china, japan, etc.), the configuration is successful.
### 3. Start Using
Just ask questions in natural language, for example:
- "Help me select strong stocks from China A-shares"
- "Analyze the technical patterns of BTC/USDT"
- "How is the China A-share market today?"
- "I have 100k capital, want to buy a certain stock, how much should I buy?"
- "Generate today's China financial news briefing"
- "Do a fundamentals-first analysis of Apple"
- "Screen US stocks with PE < 15, ROE > 15%, and RSI < 40"
- "Show me the latest TradingView community sentiment on BTCUSDT"
- "Build a G20 macro dashboard for next week"
## Usage Examples
### Smart Stock Screening
```
Help me select stocks from China A-share technology sector that meet the following conditions:
- Technical: RSI 30-70, MACD golden cross
- Fundamental: PE < 30, ROE > 15%
- Market cap: above 5 billion
```
### Individual Stock Analysis
```
Deep analysis of Puyuan Information (688118), including:
- Multi-timeframe technical analysis
- Fundamental data
- Recent news
- Buy recommendations and risk warnings
```
### Market Review
```
How is the China A-share market today? Analyze hot sectors and investment opportunities
```
### Risk Management
```
I have 100k capital, want to buy Puyuan Information, how much should I buy?
Give me position suggestions, stop-loss/take-profit levels and risk-reward ratio
```
### Fundamental Deep Dive
```
Analyze Apple from a fundamentals perspective:
- business quality
- revenue and margin trend
- cash flow and balance sheet
- dividend and analyst expectations
```
### Advanced Screener
```
Screen US stocks that satisfy:
- PE < 20
- ROE > 15%
- RSI < 40
- market cap above 10B
```
### Macro Dashboard
```
Build a macro dashboard for the G20:
- GDP growth ranking
- inflation comparison
- next 2 weeks economic calendar
- likely impact on equities, bonds, and FX
```
## Supported Markets
- 🇨🇳 **China A-shares** - SSE, SZSE, BSE
- 🇺🇸 **United States** - NYSE, NASDAQ
- 🇭🇰 **Hong Kong** - HKEX
- 🇯🇵 **Japan** - TSE
- 🇰🇷 **South Korea** - KRX
- 🪙 **Cryptocurrency** - Binance, Coinbase, OKX, etc.
- 💱 **Forex** - Major currency pairs
- 📦 **Futures** - Commodity, index futures
For complete market list, see `tradingview-quantitative/references/api-documentation.md`.
## Frequently Asked Questions
### Q: What to do if prompted "MCP server not found"?
**A**: Check the following points:
1. Confirm the config file path (`~/.cursor/mcp.json` for Cursor)
2. Confirm `"type": "http"` and `"url": "https://mcp.tradingviewapi.com/mcp"`
3. Older clients may need `"type": "streamable-http"` instead of `"http"`
4. Restart the MCP client after saving the config
### Q: What to do if authentication fails?
**A**:
1. For OAuth: complete the Console browser sign-in and allow access
2. Confirm the Console plan includes MCP (Pro does not)
3. For JWT: regenerate with `POST /api/mcp/generate` — tokens expire by plan
4. Do not put a Console API key in MCP `headers`; hosted MCP expects an MCP JWT or OAuth
### Q: How to get China A-share data?
**A**:
```
# First get market codes
tradingview_get_metadata(type='markets')
# Use market_code='china' to get A-share data
tradingview_get_leaderboard(
asset_type='stocks',
tab='gainers',
market_code='china'
)
```
### Q: Which technical indicators are supported?
**A**: When calling `tradingview_get_ta`, set `include_indicators=true` to get:
- Trend indicators: SMA, EMA, MACD, ADX
- Momentum indicators: RSI, Stoch, CCI, Williams %R
- Volume indicators: Volume, MFI
- Support resistance: Pivot Points, Fibonacci
- Others: ATR, Beta, Bollinger Bands
### Q: How to get historical K-line data?
**A**:
Use `tradingview_get_ohlcv` for real Japanese candles (returns, stops, backtests). Use `tradingview_get_price` only when you need Heikin-Ashi or Range charts.
```
tradingview_get_ohlcv(
symbol='SSE:600519', # Exchange:Code
timeframe='D', # 1/5/15/30/60/240/D/W/M
range=120 # Max 500 K-lines
)
```
### Q: Which languages are supported for news data?
**A**: Supports 19 languages, commonly used are:
- `zh-Hans` - Simplified Chinese
- `en` - English
- `ja` - Japanese
- `ko` - Korean
Complete list: `tradingview_get_metadata(type='languages')`
### Q: How do I access company fundamentals and financial statements?
**A**:
Use `tradingview_get_market_data`:
```
tradingview_get_market_data(symbol='NASDAQ:AAPL', category='company')
tradingview_get_market_data(symbol='NASDAQ:AAPL', category='indicators')
tradingview_get_market_data(symbol='NASDAQ:AAPL', category='financials_quarterly')
tradingview_get_market_data(symbol='NASDAQ:AAPL', category='dividend')
tradingview_get_market_data(symbol='NASDAQ:AAPL', category='analyst_recommendations')
```
See `tradingview-quantitative/references/fundamental-data-dive.md` for a complete analysis flow.
### Q: How do I build a custom screener instead of using leaderboard tabs?
**A**:
Use the screener workflow in this order:
1. `tradingview_get_screener_presets(asset_type='stock')`
2. `tradingview_get_screener_filter_options(asset_type='stock', lang='en')`
3. `tradingview_screen_assets` with `market`, `preset_fields`, `filters`, and `sort`
See `tradingview-quantitative/references/advanced-screener.md` and `tradingview-quantitative/references/api-documentation.md`.
### Q: Can I analyze macro data and world economy indicators?
**A**:
Yes. Combine:
- `tradingview_get_world_economy_indicator_metadata`
- `tradingview_get_world_economy_indicators(indicator, region='g20')`
- `tradingview_get_calendar(type='economic', ...)`
- `tradingview_get_news(market='economic', ...)`
See `tradingview-quantitative/references/macro-dashboard.md`.
## Directory Structure
```
tradingview-quantitative-skills/
├── README.md # This file - User guide
├── README.zh.md # Chinese user guide
├── SECURITY.md # Security policy and best practices
├── .gitignore # Git ignore patterns for sensitive files
└── tradingview-quantitative/ # AI skill package
├── SKILL.md # AI instructions and workflow routing
└── references/ # Reference knowledge and workflow guides
├── api-documentation.md # API documentation and metadata dictionary
├── mcp-tools-guide.md # MCP tools usage guide
├── technical-analysis.md # Technical analysis methodology
├── smart-screening.md # Smart stock screening workflow
├── deep-stock-analysis.md # Deep individual stock analysis workflow
└── ... # Other references and workflows
```
## Advanced Usage
### Custom Screening Criteria
Refer to `tradingview-quantitative/references/smart-screening.md` and `tradingview-quantitative/references/fundamental-screening.md`, you can combine:
- Technical indicator screening (RSI, MACD, ADX, etc.)
- Fundamental screening (PE, PB, ROE, dividend yield, etc.)
- Market cap, volume screening
- Industry sector screening
### Multi-Market Comparative Analysis
```
Compare today's financial news from China, US, and Japan, analyze market differences
```
### Portfolio Strategy Backtesting
Combining historical K-line data and technical indicators, simple strategy validation can be performed.
## Technical Support
- **API Documentation**: `tradingview-quantitative/references/api-documentation.md`
- **Tools Guide**: `tradingview-quantitative/references/mcp-tools-guide.md`
- **Practical Cases**: `tradingview-quantitative/references/us-stock-examples.md`
## Disclaimer
This tool is for learning and research purposes only and does not constitute any investment advice. Investing involves risks; enter the market cautiously. Any investment decisions made using this tool are at your own risk.
## License
MIT License