Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "pinescriptv6",
"owner": {
"name": "Jabez Vettriselvan"
},
"plugins": [
{
"name": "pinescript-v6",
"source": "./",
"description": "Pine Script v6 chunked reference docs, a routing skill, and a pinescript-developer agent for writing, reviewing, and debugging TradingView Pine Script v6 code."
}
]
}
10 changes: 10 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "pinescript-v6",
"version": "1.0.0",
"description": "Pine Script v6 chunked reference docs, a routing skill, and a pinescript-developer agent for writing, reviewing, and debugging TradingView Pine Script v6 code.",
"author": {
"name": "Jabez Vettriselvan"
},
"homepage": "https://github.com/jabez4jc/pinescriptv6",
"keywords": ["pinescript", "tradingview", "trading", "indicators", "strategies"]
}
73 changes: 68 additions & 5 deletions LLM_MANIFEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,49 @@
2. Locate the relevant file path below.
3. Retrieve ONLY that file to conserve context window.

## 0. Latest Release Updates

*Use these files first when the user asks about recently added Pine v6 features from the release notes.*

* **`release_notes.md`**
* **Content:** Chronological summary of recent Pine Script v6 additions and behavior changes.
* **Keywords:** `request.footprint`, `volume_row`, `syminfo.isin`, `timeframe_bars_back`, `line wrapping`.

## 0.5. Publishing Guidelines

*Use this file when the user asks about publishing, house rules, visibility types,
formatting tags, paid scripts, or vendor requirements.*

* **`writing_scripts/publishing_guidelines.md`**
* **Content:** House rules compliance checklists; privacy types (public/private);
visibility types (open/protected/invite-only); vendor requirements for paid scripts;
publication type decision tree; full BBCode formatting reference with usage examples
for every supported tag; unsupported tag list; per-section formatting patterns;
and LLM behaviour rules.
* **Keywords:** `publish`, `house rules`, `open-source`, `protected`, `invite-only`,
`private`, `paid script`, `vendor`, `Script Publishing Rules`, `Vendor Requirements`,
`Editors' picks`, `MPL 2.0`, `15 minutes`, `BBCode`, `[b]`, `[i]`, `[list]`,
`[pine]`, `[url]`, `[image]`, `[quote]`, `[s]`, `$SYMBOL`, `formatting`, `markup`,
`performance claims`, `compliance`, `description`, `release notes`.

---
### NEW ROUTING ENTRIES (add to the "## Routing Logic for LLMs" section):

* **IF** user asks about publishing, visibility types, or house rules:
+ retrieve `writing_scripts/publishing_guidelines.md`

* **IF** user asks about BBCode, description formatting, or markup tags:
+ retrieve `writing_scripts/publishing_guidelines.md` (Section 7 — Formatting Reference)

* **IF** user asks whether they can charge for or sell a script:
+ retrieve `writing_scripts/publishing_guidelines.md` (Section 4 — Vendor Requirements)

* **IF** user asks about the difference between protected vs invite-only vs open-source:
+ retrieve `writing_scripts/publishing_guidelines.md` (Section 2 — Visibility Types)

* **IF** user asks how to format release notes or update an existing script:
+ retrieve `writing_scripts/publishing_guidelines.md` (Section 6 — Publication Workflow)

## 1. Syntax and Core Concepts

*Use these files when the user asks about language mechanics, execution flow, or type errors.*
Expand All @@ -32,15 +75,15 @@

* **`reference/variables.md`**
* **Content:** Built-in read-only variables regarding the bar, symbol, or status.
* **Keywords:** `open`, `high`, `low`, `close`, `volume`, `time`, `syminfo.ticker`, `timeframe.multiplier`, `bar_index`.
* **Keywords:** `open`, `high`, `low`, `close`, `volume`, `time`, `syminfo.ticker`, `syminfo.isin`, `timeframe.multiplier`, `bar_index`.

* **`reference/constants.md`**
* **Content:** Fixed constants used as arguments for functions.
* **Keywords:** `color.red`, `shape.triangle`, `plot.style_line`, `size.small`, `alert.freq_once_per_bar`.

* **`reference/types.md`**
* **Content:** Data type definitions and type-casting functions.
* **Keywords:** `int`, `float`, `bool`, `color`, `string`, `line`, `label`, `box`, `simple`, `series`, `input`.
* **Keywords:** `int`, `float`, `bool`, `color`, `string`, `line`, `label`, `box`, `footprint`, `volume_row`, `simple`, `series`, `input`.

* **`reference/keywords.md`**
* **Content:** Language keywords and control structures.
Expand All @@ -60,7 +103,7 @@

* **`reference/functions/request.md` (External Data)**
* **Content:** Requesting data from other symbols, financial data, or seeds.
* **Keywords:** `request.security`, `request.financial`, `request.seed`, `request.currency_rate`.
* **Keywords:** `request.security`, `request.financial`, `request.footprint`, `request.seed`, `request.currency_rate`.

* **`reference/functions/drawing.md` (Visuals)**
* **Content:** Plotting data on the chart and drawing geometric shapes.
Expand All @@ -71,8 +114,12 @@
* **Keywords:** `array.new`, `array.push`, `matrix.new`, `matrix.mult`, `map.new`, `map.put`.

* **`reference/functions/general.md` (Math, Strings, Inputs)**
* **Content:** Core math, string manipulation, and user inputs.
* **Keywords:** `math.abs`, `math.round`, `str.tostring`, `str.format`, `input.int`, `input.bool`, `alert()`.
* **Content:** Core built-ins and general-purpose functions, including `time()` / `time_close()` behavior updates.
* **Keywords:** `time`, `time_close`, `bars_back`, `timeframe_bars_back`, `math.abs`, `math.round`, `str.tostring`, `str.format`, `input.int`, `input.bool`, `alert()`.

* **`writing_scripts/style_guide.md`**
* **Content:** Formatting conventions, including the updated line-wrapping rules for wrapped expressions in parentheses.
* **Keywords:** `style guide`, `line wrapping`, `parentheses`, `indentation`.

## 🧭 Routing Logic for LLMs

Expand All @@ -90,3 +137,19 @@

* **IF** user asks "Why is my variable resetting every bar?":
* retrieve `concepts/execution_model.md` (check `var` usage)

* **IF** user asks about `request.footprint()`, `footprint`, `volume_row`, or footprint imbalance logic:
* retrieve `release_notes.md`
* retrieve `reference/functions/request.md`
* retrieve `reference/types.md`

* **IF** user asks about `syminfo.isin`:
* retrieve `release_notes.md`
* retrieve `reference/variables.md`

* **IF** user asks about `timeframe_bars_back` in `time()` or `time_close()`:
* retrieve `release_notes.md`
* retrieve `reference/functions/general.md`

* **IF** user asks about multiline formatting or indentation rules:
* retrieve `writing_scripts/style_guide.md`
77 changes: 76 additions & 1 deletion Pine Script language reference manual
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,17 @@ A sector is a broad section of the economy. An industry is a narrower classifica

---

## syminfo.isin

**Type:** simple string

Holds a string representing the symbol's International Securities Identification Number (ISIN), or an empty string if no ISIN information is available. The ISIN is a 12-character code that identifies a security globally and does not vary across exchanges.

### Remarks
Programmers can use `syminfo.isin` to identify an underlying instrument regardless of exchange-specific ticker naming. For example, `NASDAQ:AAPL` and `GETTEX:APC` share the same ISIN because they refer to the same Apple common stock.

---

## syminfo.main_tickerid

**Type:** simple string
Expand Down Expand Up @@ -8857,6 +8868,34 @@ plot(f)

---

## request.footprint()

Requests the ID of a footprint object that contains volume footprint data for the current chart bar.

### Returns
The ID of a `footprint` object, or `na` if no footprint data is available.

### Remarks
Scripts can use the returned ID with `footprint.*()` functions to retrieve footprint-wide values such as buy volume, sell volume, delta, and special rows such as `poc()`, `vah()`, and `val()`. Scripts can then use the returned `volume_row` IDs with `volume_row.*()` functions to inspect row boundaries and imbalance information.

Only accounts with Premium or Ultimate plans can use scripts that call this function.

A single script cannot include more than one `request.footprint()` call.

### Code Example
```pine
//@version=6
indicator("Footprint summary", overlay = true)

footprint fp = request.footprint(100, 70)

if not na(fp)
volume_row pocRow = fp.poc()
label.new(bar_index, high, str.format("Delta: {0}\nPOC: {1}", fp.delta(), pocRow.up_price()))
```

---

## request.quandl()

Note: This function has been deprecated due to the API change from NASDAQ Data Link. Requests for "QUANDL" symbols are no longer valid and requests for them return a runtime error.
Expand Down Expand Up @@ -12539,14 +12578,19 @@ plot(standardChartValue, color = color.green)

## time()

The time function returns the UNIX time of the current bar for the specified timeframe and session or NaN if the time point is out of session.
The time function returns the UNIX time of the bar open for the specified timeframe, session, and timezone, or na if the time point is out of session.

### Returns
UNIX time.

### Remarks
UNIX time is the number of milliseconds that have elapsed since 00:00:00 UTC, 1 January 1970.

The function also supports a `timeframe_bars_back` parameter. Unlike `bars_back`, which offsets on the script's main timeframe, `timeframe_bars_back` offsets on the requested timeframe itself. If both parameters are present, Pine applies `bars_back` first and then applies `timeframe_bars_back`.

### Signatures
`time(timeframe, session, timezone, bars_back, timeframe_bars_back) → series int`

### Code Example
```pine
//@version=6
Expand All @@ -12568,6 +12612,10 @@ bgcolor(not na(t1) ? color.new(color.blue, 90) : na)
indicator("Time", overlay=true)
t1 = time(timeframe.period, "1000-1100,1400-1500:23456")
bgcolor(not na(t1) ? color.new(color.blue, 90) : na)

//@version=6
indicator("`timeframe_bars_back` demo")
plot(time("1M", bars_back = 10, timeframe_bars_back = 3))
```

---
Expand All @@ -12582,12 +12630,21 @@ UNIX time.
### Remarks
UNIX time is the number of milliseconds that have elapsed since 00:00:00 UTC, 1 January 1970.

The function also supports a `timeframe_bars_back` parameter. Unlike `bars_back`, which offsets on the script's main timeframe, `timeframe_bars_back` offsets on the requested timeframe itself. If both parameters are present, Pine applies `bars_back` first and then applies `timeframe_bars_back`.

### Signatures
`time_close(timeframe, session, timezone, bars_back, timeframe_bars_back) → series int`

### Code Example
```pine
//@version=6
indicator("Time", overlay=true)
t1 = time_close(timeframe.period, "1200-1300", "America/New_York")
bgcolor(not na(t1) ? color.new(color.blue, 90) : na)

//@version=6
indicator("`time_close()` `timeframe_bars_back` demo")
plot(time_close("1M", bars_back = 10, timeframe_bars_back = 3))
```

---
Expand Down Expand Up @@ -13327,6 +13384,24 @@ plot(f)

---

## footprint

Keyword used to explicitly declare the `footprint` type of a variable or parameter. Scripts create objects of this type by calling `request.footprint()`.

### Remarks
Scripts can use `footprint` IDs with `footprint.*()` functions to retrieve volume footprint totals, delta values, and row references such as `poc()`, `vah()`, and `val()`.

---

## volume_row

Keyword used to explicitly declare the `volume_row` type of a variable or parameter. Scripts obtain objects of this type from `footprint` instances.

### Remarks
Scripts can use `volume_row` IDs with `volume_row.*()` functions to retrieve row price boundaries and detect buy or sell imbalances for individual footprint rows.

---

## int

Keyword used to explicitly declare the "int" (integer) type of a variable or a parameter.
Expand Down
Loading