Answer card
Pine Script and Kestrel solve different problems. Pine is a chart-first scripting language where a human writes indicators and strategies that run bar-by-bar on a TradingView chart, then fires alerts. Kestrel is a language and runtime where an LLM authors bounded, contingent plans, perceives the market as compact text, and never sits in the execution hot path. If your author is a person watching a chart, use Pine. If your author is a model, that is exactly what Kestrel is built for.
The distinction in one sentence
A Pine script is code a human writes against a rendered chart to compute indicators, backtest a rule set, and trigger alerts. Kestrel is an interface that lets a model perceive, decide, and act safely. The confusion is worth naming because it drives every row of the table below: Pine asks how do I script what I am already watching?; Kestrel asks how does a model perceive, decide, and act without being blind, slow, or dangerous?
That second question is the whole thesis: the two failures of LLM trading are interface (perception and latency), not intelligence. A capable model handed a chart image and a synchronous "what do you do?" loop will be blind and slow no matter how smart it is. Kestrel is the interface fix.
Where TradingView Pine wins
Be honest first. TradingView is a mature, shipping product with an enormous community, and there are clear cases where Pine is simply the better tool:
- Human charting, best in class. TradingView's chart is a genuinely excellent pixel canvas for a person's eyes, across a huge breadth of instruments and timeframes. Kestrel deliberately renders the market as text for a model's context window, a poor fit if the reader is human.
- A human author who wants to script the chart. If a person wants a custom indicator, an overlay, or a rule set to backtest and alert on, Pine is a proven, well-documented path with a deep library of community scripts.
- Alerting and a mature ecosystem, today. TradingView's alerts, screeners, and community are shipping and battle-tested now. Parts of the kestrel.markets platform are still in build (see the status note below); the language and runtime model are the substance.
- Breadth of markets to look at. For simply watching and charting crypto, FX, equities, and futures side by side, TradingView is hard to beat and Kestrel does not compete on that surface.
If you are a human charting and scripting your own indicators and alerts, stop here and use Pine.
Where Kestrel is the fit (and where it is NOT)
Kestrel is the fit when the author is a model. It is not a human-facing charting app, it is not a screener, and it is not shipping a full hosted platform today. It also does not custody funds and does not provide advice. If any of those is what you need, Kestrel is the wrong tool, and it says so out loud.
Kestrel's whole design assumes the reader and author is an LLM, which changes four things: perception, latency, trust, and authorization.
The comparison table
| Dimension | TradingView Pine Script | Kestrel |
|---|---|---|
| Primary reader | Human developer; pixel chart for human eyes | A model that reads, parses, cites, and acts. The chart is in text |
| Perception model | Rendered candlestick charts + plotted series, sized for a screen | The VIEW Frame: vertical append-only tape, relative candles in basis points, keyframe-anchored; O(new bars) not O(screen), KV-cache-friendly |
| Agent in the hot path? | N/A: script runs bar-by-bar; no LLM involved | No. PLAN fires in the runtime; agent is woken in parallel: fire-then-inform, the agent is never in the hot path |
| Latency floor | Bar-close / alert-driven; execution is downstream of a webhook | Runtime fires PLANs in milliseconds; author-time model latency is off the critical path |
| Native interface / MCP | Pine editor + chart; alerts via webhook | Four equal faces: HTTP+SSE canonical, plus TypeScript SDK, CLI, MCP; identical operation IDs |
| Agent-native auth (Envelope) | Account login | The Envelope {scope, budget, ceiling, expiry, revocation}; two-signer: wallet signs commerce scopes, a human must sign broker/LIVE |
| Machine payment | Human billing | Agent wallet via Stripe MPP / x402, or human claim-and-fund; proof-before-account |
| Evaluation honesty | Strategy Tester backtests; user-run, no contamination fence | GRADE: counterfactual (VS null, VS ungated), contamination-fenced to post-cutoff date-blinded days; grades judgment, not parameters |
| Provenance | Local strategy reports; user-controlled | Certified Blotters + Grades, shareable Proof URL |
| Live model (custody) | Alerts routed to a broker via webhook/third party | BYO-broker via OAuth (Alpaca first; IBKR and Robinhood on the roadmap, order not final); never custody; the live singleton is platform-enforced |
| Data licensing | TradingView-provided feeds | Platform-owned Databento served as derived works (never raw redistribution) + BYO Alpaca |
| Activation path | Open account, write a Pine script, set alerts | Discover → trial capability (no account/card) → free catalog → author + validate → free SIM → paid boundary as HTTP 402 |
| Pricing | Free tier; paid tiers for more alerts/data | OSS language + runtime; hosted platform metered at paid boundaries |
| Best for | Human-authored indicators, backtests, and alerts on a chart | LLM-authored bounded plans on equities/options-style venues, with graded honesty and agent-native auth |
What "built for LLMs" actually changes
Kestrel is four statement kinds over one lexical core. Each maps to one of the interface failures Pine was never designed to solve, because Pine was never designed for a model author.
VIEW (perception). The market is rendered as a compact text Frame: a vertical, append-only tape, one row per candle, newest last, with relative candles in basis points versus the prior close and periodic keyframes as anchors. Perception cost is O(new bars), not O(screen). A Pine script plots series onto a chart for human eyes; a model reads a Frame that fits its context window. A quote is not a value.
WAKE (attention). A standing subscription over a trigger algebra: event-driven, not polling. It spends attention (tokens/wakes), never risk.
PLAN (latency). A standing, bounded-risk contingent program: trigger → actions → bracket → invalidation → TTL. The runtime fires it in milliseconds and wakes the agent in parallel. This is fire-then-inform, and it is why the agent is never in the hot path, the exact thing a synchronous "ask the LLM what to do" loop, or a webhook round-trip, gets catastrophically wrong.
GRADE (trust). The honest, counterfactual result of a run. LLM authors are graded only on post-training-cutoff, date-blinded days, so a model cannot score by having memorized the tape. Grades judge judgment, not parameters, and carry VS null and VS ungated counterfactuals in the syntax. Weights leak what code fences can't stop, so the fence is structural, not promised.
An illustrative Kestrel plan
This is illustrative only, on generic instruments: not a strategy recommendation and not advice. It shows how an agent could express a momentum-continuation idea, and how you would deploy this template into your own pod and arm it yourself.
IMPORT { fade-ladder } FROM "./armory/reversion.kestrel"
USING signal SPX exec SPY 0dte
PLAN momo-break budget 2R ttl +45m regime {intraday: trend}
WHEN spot crosses above HOD AND velocity(5m) >= p95 held 120s
DO buy 1 atm C @ lean(bid, fair, 0.5) cap fair
RELOAD WHEN spot crosses above +1 buy 1 +1 C @ fair-3c cap fair
TP 2x frac 0.5 @ fair+5c
EXIT velocity(5m) < p50 @ bid
INVALIDATE spot crosses below HOD
WAKE momo-break
WHEN velocity(5m) >= p90
DELIVER momo-frame
BUDGET 20 wakes/day
VIEW momo-frame budget 900
tape 5m
book
velocity
GRADE plan momo-break OVER 2026-04..2026-06 FILL conservative
VS null
BY regimeThe runtime fires the PLAN in milliseconds when the trigger algebra evaluates true; the agent is woken in parallel to observe, not to gate the fill. The GRADE line asks the honest question: did this beat doing nothing (VS null), scored only on days the author's weights could not have seen?
Provenance, authorization, and honesty
The commercial platform, kestrel.markets (the Vercel to Kestrel's Next.js), hosts only what stays scarce when intelligence is abundant: capital and trading authority, licensed data, compute and broker access, deterministic execution, and provenance. Brains stay outside: the external-agent invariant. That is the posture: host the scarcity, rent the genius; sell the airport, not the pilots.
Authority flows through one primitive, the Envelope, and it only ever narrows downward. A wallet may sign commerce-only scopes (data, sim, grade); a human must sign anything legal, broker, or LIVE. Risk (L0) can clamp or veto anyone, including the agent, and may never itself open risk. LIVE is a platform-enforced singleton.
And the honesty is structural, not promotional: Kestrel is an open judge. Certification is the open recomputation anyone can run; what the platform sells is the Attestation, its signature on the result, never custody. As of mid-2026: anonymous trial sims, certified Grades, shareable proof URLs, and 402 Offers with Stripe settlement are live; always-on paper presence and the human-signed live path are in build. The free tier needs no signup.
Bottom line
Pine Script scripts the chart a human is watching; Kestrel gives the model the interface it needs to perceive, decide, and act, because the two failures of LLM trading are interface, not intelligence.