Skip to content

Releases: jpantsjoha/pinescript-plugin

v0.4.3 — Accumulator lifetime (S3)

Choose a tag to compare

@jpantsjoha jpantsjoha released this 08 Aug 14:40

Engine: pinescript-v6-validator@0.3.0

Eight checks now ship

S3 — accumulator lifetime. A var total that a loop re-adds to every bar, and nothing resets, grows for the life of the chart. Found in the field after every layer of the stack missed it.

The guidance was backwards

The skills said "declare accumulators var so they persist" — correct for a running total, and precisely what produces the bug above. Run the old checklist against the broken code and every item ticks.

No skill mentioned for or while at all. All three now cover both directions and ask the question that decides it: does the accumulator's lifetime match its meaning? "Total so far" wants var; "total for this bar" must not have it.

More honest about what it cannot see

The limitations section implied name-checking was covered. It is not:

  • Constant and built-in-variable names are never checked — shape.trianglup validates clean here and fails on TradingView
  • lookup_pine_reference covers functions only, so found: false for barstate.islast means "not a function", not "not real"
  • Re-declaring a name with = passes here

Stronger gate

make gate could print "Gate passed" over zero validated examples when the engine was missing. The five scaffolds advertised as "validated in CI" were opened by no script at all. Both fixed, plus a new check that every diagnostic's documentation link resolves to a real section.

Full changelog: CHANGELOG.md

v0.4.2 — corrected semantic checks reach hub installs

Choose a tag to compare

@jpantsjoha jpantsjoha released this 08 Aug 09:58

v0.4.1 was tagged before the engine fix landed, so hub installs picked up three broken checks. This corrects that.

Check Was silently missing
S1 Every multi-line request.security(). Wrapping is the normal formatting, so most real repainting went undetected.
S2 The false branch of a ternary. cond ? na : ta.sma(...) passed clean.
S9 Counted strategy.cancel as an exit. Cancel withdraws a pending order; it does not close a position.

Requires pinescript-v6-validator@^0.2.1.

No other change.

v0.1.0 — initial release

Choose a tag to compare

@jpantsjoha jpantsjoha released this 07 Aug 15:21

First tagged release of the Pine Script v6 agent plugin.

What works

  • Agent Plugins 1.0.0 conformant — verified by scripts/validate_agent_plugins.py
  • skills/pinescript-v6 — execution model, the two call forms of line.new / label.new / box.new, anti-repainting, platform limits, and API through July 2026
  • MCP servervalidate_pine_script (runs both diagnostic paths, so it agrees with the VS Code extension) and lookup_pine_reference (real signatures, overloads surfaced explicitly)
  • make gate — spec conformance, skill contracts, link resolution, embedded-example validation, and 14 MCP behaviour tests. Also a pre-commit hook.

Every Pine example in every skill is extracted and run through the real validator in CI. A skill shipping code that fails its own checker would defeat the purpose, so the build blocks it.

Not yet ready for a hub listing

  • One skill. Three more planned.
  • The engine is not on a package registry, so the plugin needs a local checkout of pinescript-vscode-extension.

Both are in the CHANGELOG.