pinescript-v6-indicator

pinescript-v6-indicator is a skill for Claude Code, Codex from itsabubakarshf/pinescript-v6-gxt-toolkit. It costs 108 tokens per session (10,074 once invoked), scanned A, original, MIT.

A development guide for TradingView indicators written in Pine Script version 6, TradingView’s language for displaying trading calculations on charts.

In plain words
What is it for?
Use it to build, debug, refactor, or extend indicators involving signals, price swings, multiple assets, trading sessions, or chart dashboards.
Why use it?
It helps avoid common coding and trading-logic mistakes before an indicator is changed or built.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/itsabubakarshf/pinescript-v6-gxt-toolkit/skill
Any agent
npx skills add itsabubakarshf/pinescript-v6-gxt-toolkit --skill skill
Clone the repo
git clone --depth 1 https://github.com/itsabubakarshf/pinescript-v6-gxt-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pinescript-v6-indicator

README.md
[![agentmods](https://agentmods.dev/badge/skills/itsabubakarshf/pinescript-v6-gxt-toolkit/skill.svg)](https://agentmods.dev/skills/itsabubakarshf/pinescript-v6-gxt-toolkit/skill)
Your own site
<a href="https://agentmods.dev/skills/itsabubakarshf/pinescript-v6-gxt-toolkit/skill"><img src="https://agentmods.dev/badge/skills/itsabubakarshf/pinescript-v6-gxt-toolkit/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00108 $0.10074
Opus 5 $0.00054 $0.05037
Sonnet 5 $0.00022 $0.02015
Haiku 4.5 $0.00011 $0.01007

Measured 5d ago against content hash 1d82529eaa35, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pinescript-v6-indicator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/SKILL.md · 976 lines

How it starts

The opening of the file, as written. The whole thing — 976 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pine Script v6 Indicator Development Skill

You are an expert Pine Script v6 developer with deep knowledge of ICT/Smart Money methodology, GxT trading concepts, and TradingView's execution model. Your job is to write correct, efficient, readable Pine Script v6 code and prevent the mistakes that commonly break indicators in production.


1. ALWAYS DO FIRST — Before Writing Any Code

Step 1 — Understand the trading logic in plain language. Before touching code, restate the signal/feature in trading terms and confirm with the user. Example:

"So SSMT means: on 90m+, two consecutive confirmed candles where Asset A makes a higher high but Asset B doesn't — both candles must be closed, not just forming."

Only proceed once the trading logic is confirmed. Misunderstanding the concept = wrong code guaranteed.

Step 2 — Identify scope. Ask: Is this a surgical edit (touch only X) or a full rewrite of a section? Never restructure code the user didn't ask to change.

Step 3 — Clarify the Pine Script version. Always write v6. If the user pastes v5 code, note the differences before editing.


2. PINE SCRIPT V6 — CRITICAL SYNTAX RULES

2.0 Top-Down Compiler Rule (Scope Integrity)

Pine Script reads code strictly from line 1 downward.

  • ALWAYS declare global input variables, colors, and offset multipliers at the absolute top of the script (after indicator()).
  • NEVER reference a variable inside a function or drawing engine if it was declared lower in the script. This triggers the "Undeclared identifier" error.
  • NEVER duplicate function names, variable names, or input(group="") titles.

2.1 Boolean / Integer Comparisons (BREAKING CHANGE FROM V5)

In v6, integers are NOT implicitly cast to bool.

// ❌ WRONG — v5 style, breaks in v6
if myIntVar
    doSomething()

// ✅ CORRECT — explicit comparison required
if myIntVar != 0
    doSomething()

// ❌ WRONG
confirmed = barstate.isconfirmed and mySwingBar
// ✅ CORRECT
confirmed = barstate.isconfirmed and mySwingBar != 0

Read the full file on GitHub · 976 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 976 lines · 108 tokens per session scan A 1d82529eaa35

Subscribe to this mod's changes

pinescript-v6-indicator is a skill published in the GitHub repository itsabubakarshf/pinescript-v6-gxt-toolkit (11 stars, last pushed 4mo ago), licensed MIT. It adds 108 tokens to every session and 10,074 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.