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

Analyzed September 19, 2026 at c05b8f5 (main) with jscpd 5.4.0 in 0.0s.

B73.7/100
Project health10,463 lines of code (M)
Duplication82
2.3% in javascript, bash, perl
Dead 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

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 ready
    

    First 10 of 21 lines.

4 more
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
FormatFilesLinesClonesDuplicated linesDuplication
javascript556,3268691.09%
bash117791212.7%
perl1174000%
By format, all files
FormatFilesLinesClonesDuplicated linesDuplication
javascript649,466182342.47%
bash138161212.57%
markdown121,206000%
perl1174000%
yaml136000%
json133000%
text233000%

Trending appearances

DayRankStarsFilesLinesClonesAll filesCodeHealthCommit
Sep 19, 2026#116,509 (+79)9411,764192.17%1.24%B 73.7c05b8f5

Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.