WallStreetDebug>_ Wall Street, debugged.
Markets
Subscribe
AI for Pine Script

Which AI writes working Pine Script? What the published tests show, and why most of them can't settle it

Dozens of tools now promise TradingView indicators from a sentence. We collected every Pine Script test we could find with a stated method. Most are small, most are run by vendors, and 'it compiles' turns out to be the wrong finish line.

26 of 30Claude tasks that compiled and ran logically, one vendor testContext: n=30 strategy tasks · early 2026 · PickMyTrade blog · margin: not disclosed
5Prompts behind a widely quoted 88% scoreContext: n=5 prompts x 5 criteria per model · Apr 2026 · PickMyTrade blog · margin: not disclosed
0Independent, reproducible public benchmarks found

Pine Script is TradingView's own language, and AI tools stumble on it for a specific reason: version 6 shipped on December 10, 2024, and most code a model learned from is older. Ask for an indicator and you may get v5 calls that TradingView's editor rejects. Here is what the published tests say about which tools handle it, read October 14, 2026.

The tests with a stated method

Published Pine Script tests with a stated method (read October 14, 2026)
TestWho ran itSampleHeadline result
ChatGPT vs Claude vs GeminiPickMyTrade (trade-automation vendor), Apr 20265 strategy prompts, 25 points per modelClaude 22/25, ChatGPT 18/25, Gemini 15/25
Claude vs GitHub CopilotPickMyTrade, early 202630 strategy tasksClaude 26/30, Copilot 19/30 compiled and ran logically
Quant vs ChatGPT and GeminiLuxAlgo (sells Quant), Feb 21, 2026100 indicator evaluationsQuant ahead; pass rates not stated in text
TradingView AI CopilotKagels Trading (paid user), Sep 30, 20261 indicator task within 7 tasksCompiled, but signal never fired

Sources: PickMyTrade three-model test, PickMyTrade Claude vs Copilot, LuxAlgo benchmark, Kagels Trading.

What each one actually tells you

The three-model test ran five identical strategy prompts through ChatGPT (GPT-4o), Claude (Sonnet 4.5) and Gemini (2.0 Flash), scoring first-compile success, v6 syntax, logic, readability and debuggability. Claude scored 88%, ChatGPT 72% and Gemini 60% Context: n=5 prompts x 5 criteria per model · Apr 2026 · PickMyTrade blog · margin: not disclosed. The finding that holds up best is qualitative: only Claude used v6 syntax by default, and adding 'use Pine Script v6' to the prompt fixed ChatGPT's version errors. Five prompts cannot rank models, and all three versions tested have since been replaced.

The Claude versus Copilot test reports Claude producing compiling, logically coherent code on 26 of 30 tasks without manual fixes against 19 of 30 for GitHub Copilot, with the gap widening on multiple exit conditions and dynamic stops. The same post leans on a general coding benchmark, quoting Claude Sonnet 4 at 72.7% on SWE-bench Verified against about 55% for Copilot Workspace Context: n: not disclosed in the post · scores dated May 2025 per the post · PickMyTrade, citing Anthropic · margin: not disclosed; that measures general software tasks, not Pine Script.

LuxAlgo's benchmark has the strictest failure definition we found: syntax or runtime errors, NaN or constant outputs, or not doing what was asked all count as failures, across 100 evaluations. It is also the hardest to use, because the pass rates appear only in a graphic and the test set is not published. Our LuxAlgo Quant tool page tracks its plans.

The Copilot test is the most instructive single example. TradingView's built-in AI wrote a Donchian Channel indicator in 42 seconds and marked it with a green check; the breakout signal contained a logic error and never fired, and the Copilot fixed it only when asked. Compiling meant no syntax error, not a working rule. Plans are on our TradingView tool page.

The claims without a method

Specialist generators advertise high success rates: Pineify cites about 85% first-try compiles for itself and PineGen AI reports 98% Context: n: not disclosed · claims seen Oct 2026 · Pineify blog and PineGen AI, self-reported · margin: not disclosed. Neither figure comes with a published test set. Tellingly, Pineify's own comparison page against a rival states that no reproducible account-level benchmark was available, so it makes no accuracy or compile-rate claim. That is the honest position for the whole category.

Why 'it compiles' is the wrong finish line

Every test above that looked past compilation found the same thing: the dangerous errors are logical. A signal that never fires, a stop that never triggers, a condition evaluated on an unconfirmed bar that later repaints. TradingView's compiler catches none of these.

A known-answer routine for any tool

  • Say the version. Put 'Pine Script v6' in every prompt.
  • Test on a chart where you know the answer. Pick a period with obvious crossovers or breakouts and check that every signal appears where it should, and nowhere else.
  • Check confirmed bars. Ask the tool to show where it uses confirmed-bar logic, then watch a live bar to see whether signals change.
  • Make it explain each condition in words. Mismatches between the explanation and the code are where the logic bugs hide.
  • Ignore backtest screenshots from the tool's marketing. A strategy that compiles can still be overfit.

What it shows / What it doesn't

It shows

  • Every Pine Script AI test we found with a stated method, who ran it, and its sample size.
  • A consistent qualitative finding: general models often default to older Pine Script syntax unless told to use v6.
  • A dated case where AI-written code compiled cleanly but its trading signal never fired.

It doesn't show

  • A reliable ranking. The tests use 1 to 100 tasks, different tools and different scoring, and most are run by vendors.
  • Current model versions. Most tests used models that have since been updated.
  • Accuracy of specialist generators. Their success rates are self-reported without a published test set.
  • Whether any generated strategy makes money.

Why it matters

AI can write a first draft of an indicator in seconds, which is real homework saved. Whether the rule does what you meant is only visible on a chart where you know the answer, and that check, like the decision to trade it, stays with you.

Primary sources

In our directories

How we used AI: AI tools helped research and draft this article. Every figure was then checked against the primary sources listed above before publication.

Not financial advice. For information and education only. AI model outputs and research results can be wrong and do not predict future returns. Nothing here is a recommendation to buy or sell any asset. See our disclaimer and methodology.

Pine ScriptTradingViewClaudeChatGPTLuxAlgo