2 views
tradesdontlie/tradingview-mcp
AI-assisted TradingView chart analysis — connect Claude Code to your TradingView Desktop for personal workflow automation
JavaScript★ 6,509+79 that day#11 on trending
B73.7/100
Duplication82
2.3% in javascript, bash, perlDead code95
0%Complexity53
50.9% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1.24%duplicated code · 90 of 7,279 lines
9clones in code
67code files of 94 scanned
2.17%duplicated over all files · 19 clones
Most complex files
- tests/e2e.test.js186 cx
- src/core/data.js130 cx
- src/core/health.js96 cx
- src/core/pine.js96 cx
- tests/replay.test.js92 cx
- src/core/tab.js81 cx
- tests/sanitization.test.js77 cx
- src/core/chart.js65 cx
- tests/pine_analyze.test.js58 cx
- src/core/ui.js57 cx
Dead code 0.01% unused · 1 findings
- src/core/pane.js:getClientunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 13 lines in 3 placesjavascript77 tokens
20description: 'Set Pine Script source (reads stdin or --file)', 21options: { 22 file: { type: 'string', short: 'f', description: 'Read source from file' }, 23}, 24handler: async (opts) => { 25 let source; 26 if (opts.file) { 27 source = readFileSync(opts.file, 'utf-8'); 28 } else { 29 source = await readStdin();First 10 of 13 lines.
- 6 lines in 3 placesjavascript54 tokens
15server.tool('alert_list', 'List active alerts', {}, async () => { 16 try { return jsonResult(await core.list()); } 17 catch (err) { return jsonResult({ success: false, error: err.message }, true); } 18}); 19 20server.tool('alert_delete', 'Delete a specific alert by id, or all active alerts', {6server.tool('pane_list', 'List all chart panes in the current layout with their symbols and active state', {}, async () => { 7 try { return jsonResult(await core.list()); } 8 catch (err) { return jsonResult({ success: false, error: err.message }, true); } 9}); 10 11server.tool('pane_set_layout', 'Change the chart grid layout (e.g., single, 2x2, 2h, 3v)', { - 21 lines in 2 placesbash93 tokens
47pkill -f "[Tt]rading[Vv]iew" 2>/dev/null 48sleep 1 49 50echo "Found TradingView at: $APP" 51echo "Launching with --remote-debugging-port=$PORT ..." 52"$APP" --remote-debugging-port=$PORT & 53TV_PID=$! 54echo "PID: $TV_PID" 55 56# Wait for CDP to be readyFirst 10 of 21 lines.
4 more
- 9 lines in 2 placesjavascript90 tokens
- 7 lines in 2 placesjavascript73 tokens
- 6 lines in 2 placesjavascript63 tokens
- 9 lines in 2 placesjavascript63 tokens
Largest clones over all files, tests and data included
- 45 lines in 2 placesjavascript393 tokens
78export function analyze({ source }) { 79 const lines = source.split('\n'); 80 const diagnostics = []; 81 82 let isV6 = false; 83 for (const line of lines) { 84 const trimmed = line.trim(); 85 if (trimmed.startsWith('//@version=6')) { isV6 = true; break; } 86 if (trimmed.startsWith('//@version=')) break; 87 if (trimmed === '' || trimmed.startsWith('//')) continue;12function analyze(source) { 13 const lines = source.split('\n'); 14 const diagnostics = []; 15 let isV6 = false; 16 for (const line of lines) { 17 const trimmed = line.trim(); 18 if (trimmed.startsWith('//@version=6')) { isV6 = true; break; } 19 if (trimmed.startsWith('//@version=')) break; 20 if (trimmed === '' || trimmed.startsWith('//')) continue; 21 break;First 10 of 45 lines, the second copy on the right.
- 13 lines in 3 placesjavascript77 tokens
20description: 'Set Pine Script source (reads stdin or --file)', 21options: { 22 file: { type: 'string', short: 'f', description: 'Read source from file' }, 23}, 24handler: async (opts) => { 25 let source; 26 if (opts.file) { 27 source = readFileSync(opts.file, 'utf-8'); 28 } else { 29 source = await readStdin();First 10 of 13 lines.
- 19 lines in 2 placesjavascript126 tokens
122 line: i + 1, column: match.index + 1, 123 message: `array.${method}(${arrName}, ${idx}) — index ${idx} out of bounds (array size is ${info.size})`, 124 severity: 'error', 125 }); 126 } 127 } 128} 129 130for (let i = 0; i < lines.length; i++) { 131 const line = lines[i];56 line: i + 1, 57 message: `array.${method}(${arrName}, ${idx}) — index ${idx} out of bounds (array size is ${info.size})`, 58 severity: 'error', 59 }); 60 } 61 } 62} 63 64// Unguarded first/last on empty arrays 65for (let i = 0; i < lines.length; i++) {First 10 of 19 lines, the second copy on the right.
- 6 lines in 3 placesjavascript54 tokens
- 21 lines in 2 placesbash93 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| javascript | 55 | 6,326 | 8 | 69 | 1.09% |
| bash | 11 | 779 | 1 | 21 | 2.7% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| javascript | 64 | 9,466 | 18 | 234 | 2.47% |
| bash | 13 | 816 | 1 | 21 | 2.57% |
| markdown | 12 | 1,206 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
| yaml | 1 | 36 | 0 | 0 | 0% |
| json | 1 | 33 | 0 | 0 | 0% |
| text | 2 | 33 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 19, 2026 | #11 | 6,509 (+79) | 94 | 11,764 | 19 | 2.17% | 1.24% | B 73.7 | c05b8f5 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.