Skip to content
Finance
Skill

/pine-visualizer

Analyzes trading concepts and YouTube videos to extract Pine Script specifications. Use when planning indicators or analyzing video tutorials.

From plugin
pinescript
24512 skills3 agents3 commands2 hooks
+1

Claude Code

$ npx -y skills add traderspost/pinescript-agents --skill pine-visualizer --agent claude-code

SKILL.md

pine-visualizer.SKILL.md
name: pine-visualizer
description: Analyzes trading concepts and YouTube videos to extract Pine Script specifications. Use when planning indicators or analyzing video tutorials.
allowed-tools: Read, Glob, Grep, Bash, WebFetch

Pine Script Visualizer

Specialized in decomposing complex trading ideas into actionable Pine Script components.

YouTube Video Analysis

CRITICAL: When a YouTube URL is Provided

**IMMEDIATELY run the video analyzer** - do not ask for permission:

python tools/video-analyzer.py "<youtube_url>"

Video Analyzer Features

The tool automatically: 1. **Fetches video metadata** (title, author, duration) 2. **Extracts transcript** using the fastest available method:

  • First tries YouTube's built-in captions (instant)
  • Falls back to Whisper transcription if needed

3. **Analyzes trading content**:

  • Detects indicators (RSI, MACD, EMA, Bollinger Bands, etc.)
  • Identifies patterns (breakout, divergence, crossover, etc.)
  • Extracts entry/exit conditions
  • Finds risk management rules
  • Captures specific parameters (periods, percentages, levels)

4. **Generates a specification** for Pine Script implementation 5. **Saves analysis** to `projects/analysis/` for reference

Command Options

# Standard analysis (uses YouTube captions, fast)
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123"

# Force Whisper transcription (slower but works without captions)
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123" --whisper

# Use larger Whisper model for better accuracy
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123" --whisper --model medium

# Output raw JSON for programmatic use
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123" --json

After Video Analysis

1. **Review the analysis** with the user 2. **Confirm understanding** - ask if the extracted concepts match their expectations 3. **Refine if needed** - user can describe adjustments 4. **Proceed to implementation** - hand off to pine-developer skill

CRITICAL INSTRUCTIONS

  • **NEVER use WebSearch for YouTube videos** - use the local analyzer
  • **DO NOT ask permission** - run analysis immediately when URL is detected
  • **ALWAYS show the summary** to the user for confirmation
  • **Transcripts are cached** - re-analyzing the same video is instant

⚠️ CRITICAL: UDT-First Planning

**When breaking down trading ideas, ALWAYS plan for UDT architecture FIRST.**

When to Plan for UDTs

Plan for UDT architecture when the trading idea involves:

  • Multiple related data points (e.g., regression: slope, intercept, R-value)
  • Drawing objects that need to be managed together (lines, fills, labels)
  • Collections of similar items (e.g., swing highs, order blocks, zones)
  • Historical lookback beyond 5000 bars

UDT Planning Template

When decomposing a trading idea, include this section:

UDT ARCHITECTURE:
1. Type Definition
   - What fields does each instance need?
   - Include time + bar_index for coordinates
   - Include drawing objects as fields

2. Storage
   - Single var array for collection
   - Named instances for special cases (original, live, current)

3. Methods
   - delete(): Clean up drawing objects
   - draw(): Create visuals using xloc.bar_time
   - calculateY(): If line-based calculations needed

4. Coordinate Strategy
   - Store TIME when events occur (for unlimited lookback drawing)
   - Store bar_index for Y calculations (slope * bar + intercept)

Example: Planning a Swing High Detector

**User Request**: "Create an indicator that marks swing highs and draws levels from them"

**UDT-First Breakdown**:

UDT ARCHITECTURE:
1. Type Definition:
   type SwingHigh
       int detectedTime      // When swing was detected
       int detectedBar       // For Y calculations
       float price           // The high price
       int confirmedTime     // When confirmed
       line levelLine = na   // Horizontal level from swing
       label marker = na     // Label marking the swing

2. Storage:
   var array<SwingHigh> swingHighs = array.new<SwingHigh>()
   var SwingHigh currentPending = na  // Unconfirmed swing

3. Methods:
   method delete(SwingHigh this) =>
       if not na(this.levelLine)
           line.delete(this.levelLine)
       if not na(this.marker)
           label.delete(this.marker)

   method draw(SwingHigh this, color lineColor) =>
       this.delete()
       // Use xloc.bar_time for unlimited lookback!
       this.levelLine := line.new(this.detectedTime, this.price,
            time, this.price, xloc=xloc.bar_time, ...)
       this.marker := label.new(this.detectedTime, this.price,
            "SH", xloc=xloc.bar_time, ...)

4. Coordinate Strategy:
   When swing detected:
       capturedTime := time        // For drawing
       capturedBar := bar_index    // For calculations

Anti-Patterns to Flag Early

When analyzing a trading idea, flag these issues:

| If the idea has... | Flag this issue... | Recommend instead... | |--------------------|--------------------|----------------------| | Multiple related values | Don't use parallel arrays | Use single UDT array | | Historical drawings | bar_index has 5000 limit | Use xloc.bar_time | | Repeated drawing code | DRY violation | UDT draw() method | | Manual line deletion | Error-prone | UDT delete() method |

Pine Script v6 2025 Planning Considerations

When analyzing and planning implementations, consider these critical 2025 updates:

Breaking Changes to Flag Early

**March 2025: Use `for...in` for Collections** When planning loop-based implementations (order blocks, swing detection, pattern scanning):

// ✅ BEST: Use for...in for arrays (safe, clean, preferred)
for element in myArray
    // Process element directly - no boundary issues

// ✅ BEST: With index when needed (e.g., order blocks, swing points)
for [index, element] in myArray
    // Have both index and value

// ✅ Works with ma
Read more
@traderspost
Ships withpinescript

A comprehensive Pine Script development environment powered by Claude Code's Skills system. This tool helps you create professional TradingView indicators and strategies with AI assistance. Just type start to begin!

24512 skills3 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
245
Star history of traderspost/pinescript-agents on GitHub, a chart by star-history.com

Other skills on pinescript.

pine-backtester

pine-backtester

Implements comprehensive backtesting and performance metrics. Use when adding trade analysis, equity curves, or statistical…

pine-debugger

pine-debugger

Troubleshoots Pine Script issues and adds debugging capabilities. Use when scripts have errors or unexpected behavior.

pine-developer

pine-developer

Writes production-quality Pine Script v6 code following TradingView guidelines. Use when implementing indicators, strategies, or…

pine-manager

pine-manager

Orchestrates complex Pine Script projects by coordinating multiple development phases. Use for complete trading systems.

pine-optimizer

pine-optimizer

Optimizes Pine Script for performance and user experience. Use when improving speed, UI organization, or visual appeal.

pine-publisher

pine-publisher

Prepares Pine Scripts for TradingView publication with documentation and compliance checks. Use when finalizing scripts for…

More skills from other plugins.

ccxt-cli

ccxt-cli

CCXT command-line interface (ccxt-cli) for interacting with 100+ cryptocurrency exchanges directly from the terminal — no code…

ccxt2w45k
@ccxt@ccxtInstall Skill

Questions about pine-visualizer.

Which coding agents can use pine-visualizer?
pine-visualizer installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.