Indicator
A local Indicator for agents and terminal users to fetch TradingView-style market data, write Pine Script v6, push scripts into TradingView's Pine Editor, and capture chart screenshots.
trading-view CLI
● Playwright browser profile
● MCP servers
● Pine v6 agent skill
Open this file locally
From the project root:
open docs/integration.html
Start with the health checks:
make doctor
make session-check
How the pieces connect
make rating, make push, or direct trading-view ... command.tvdatafeed for OHLCV and tradingview-screener for ratings/screeners.skills/pinescript-v6 to author valid Pine v6 files.1. Install
Creates/updates the indicator conda env and installs package deps.
make install
cp .env.example .env
make doctor
2. Login
Preferred: let Playwright save your TradingView browser session.
make login
make session-check
Fallback: paste TV_SESSIONID into .env.
3. Use it
Run through Make without activating conda.
make rating SYMBOL=NASDAQ:TSLA
make screenshot SYMBOL=NASDAQ:TSLA
Common terminal workflows
| Goal | Command |
|---|---|
| Find a ticker | make search Q=tesla |
| Get OHLCV | make ohlcv SYMBOL=NASDAQ:TSLA INTERVAL=1D BARS=30 |
| Get TV rating | make rating SYMBOL=NASDAQ:TSLA |
| Take screenshot | make screenshot SYMBOL=NASDAQ:TSLA |
| Create indicator template | make pine-new KIND=indicator NAME=my_indicator |
| Validate Pine locally | make pine-validate SCRIPT=scripts/indicators/my_indicator.pine |
| Push Pine to chart | make push SCRIPT=scripts/indicators/my_indicator.pine APPLY=NASDAQ:TSLA SHOT=1 |
Direct trading-view CLI
Activate the conda env if you prefer calling the CLI directly.
source conda-env-active.sh indicator
trading-view data search "tesla"
trading-view data rating NASDAQ:TSLA
trading-view data ohlcv NASDAQ:TSLA --interval 1D --bars 50
trading-view browser screenshot --symbol NASDAQ:TSLA
trading-view browser push scripts/indicators/my_indicator.pine --apply NASDAQ:TSLA --screenshot
Agent integration
The canonical Pine skill lives at skills/pinescript-v6/SKILL.md.
Project-local discovery files point to it for Claude Code, pi, Cursor, Gemini, and Codex-style agents.
| Agent/tool | Project path | Purpose |
|---|---|---|
| pi | .pi/agent/skills/pinescript-v6 | Project-local skill symlink. |
| Claude Code | .claude/skills/pinescript-v6 | Project-local skill symlink. |
| Cursor | .cursor/rules/pinescript-v6.mdc | Thin rule pointing to the canonical skill. |
| Codex/OpenCode/Aider | AGENTS.md | Project agent instructions. |
| Gemini CLI | GEMINI.md | Project agent instructions. |
make install-skills
make check-skills
make update-skills
MCP integration
Expose data and browser functions to MCP-capable agents.
make mcp-config-claude
make mcp-config-pi
make mcp
MCP server:
indicator-mcp: OHLCV, search, screener, ratings, session check, push script, screenshot, and agent docs
Generated artifacts
Screenshots are runtime output and are intentionally gitignored:
screenshots/* is ignored while screenshots/.gitkeep is tracked.
Files you usually commit:
scripts/indicators/*.pineandscripts/strategies/*.pineskills/pinescript-v6/**src/indicator/**Makefile,README.md,docs/integration.html
Example: check TSLA end-to-end
make search Q=tesla
make rating SYMBOL=NASDAQ:TSLA
make ohlcv SYMBOL=NASDAQ:TSLA INTERVAL=1D BARS=30
make screenshot SYMBOL=NASDAQ:TSLA
make push SCRIPT=scripts/indicators/tsla_levels.pine APPLY=NASDAQ:TSLA SHOT=1
This produces market context, a chart screenshot, and — if the Pine file exists — applies the indicator to the TSLA chart. Screenshot PNGs stay local and are not committed.