Skip to content

Why we built PineForge

421 trades through an OCA exit group. Not one differs.

−2000200
Jul 2025Oct 2025Jan 2026Apr 2026
USDT

Tap or drag the chart to read any point.

Cumulative P&L in USDT, ETHUSDT 15m, open corpus d75b4fa. Both trade lists

The chart as a table
Cumulative P&L at the last trade of each month, USDT
TradeExit time, UTCTradingViewPineForge
332025-04-30 14:30129.88129.88
572025-05-31 08:45258.48258.48
882025-06-30 11:15188.84188.84
1122025-07-31 23:3029.9729.97
1442025-08-30 03:15140.67140.67
1752025-09-28 13:1585.9585.95
2082025-10-30 20:45−14.07−14.07
2492025-11-29 18:30−128.25−128.25
2712025-12-29 14:45162.43162.43
3122026-01-31 23:15205.72205.72
3532026-02-28 08:15172.19172.19
3852026-03-31 12:00368.20368.20
4212026-04-29 21:45305.73305.73
How this is measured

oca-exit-bracket-internal-cancel-01 exits through an OCA group. TradingView’s trade book is the broad stroke, PineForge’s the thread inside it: 421 trades in each book close at the same times with the same cumulative P&L, to the cent.

We did not start at strict parity. Today the open corpus holds 312 strategies, 311 excellent and 1 declared anomaly, and the 2026‑10‑13 baseline on engine main grades 100.00 % of 7,989 backtests on 9 markets excellent or strong against TradingView’s own trades. The gap was not closed by writing more codegen; it was closed by chasing divergences one at a time.

Source: scripts/check_corpus_parity.sh in pineforge-engine, commit 35db01c8, line 86; pineforge-corpus commit d75b4fa

Source: parity campaign records (internal, not public): baseline pineforge-parity-baseline-20261013-engine-2608ebdd (snapshot sha256 438ca43a…5aac, population cf857209…b062); scripts by origin: pineforge-engine README.md, d1d18867; trade count: pineforge-release facts.json.

Most of that work went into matching TradingView’s specific definitions of words like “exit”, “fill” and “trail”. The Pine documentation describes the API; the exact semantics of order processing only become visible when you diff trade lists bar by bar. We did that, kept asking why ours and the reference disagreed, and ironed out the differences one at a time.

The one remaining open-corpus exception, anomaly-equity-mirror-strategy-equity-01, is declared an anomaly, so the corpus gate reports it as one rather than as a failure. Its notes record the original diagnosis: at exactly 1× equity, TradingView’s margin check admitted some entries above equity and rejected some below it. That diagnosis is under review: the 2026‑10‑13 parity baseline graded this probe excellent.

Why offline reproducibility

TradingView is where most Pine strategies live, and for good reason: instant chart-side iteration, a huge community, social sharing. What it doesn’t ship is an offline runtime: you can’t pin the engine version, you can’t run a backtest in CI, you can’t reproduce a trade-list bit-for-bit on another machine.

For browsing chart ideas, none of that matters. For building a strategy you’d put real money behind, all of it matters. The gap between “I see a number in a browser” and “I have an audit trail” is what we set out to close, without leaving the Pine language behind.

Why not contribute to PyneCore

PyneCore is the most ambitious open-source PineScript engine, and we use it ourselves as a second opinion. Two reasons PineForge is its own engine:

Runtime model
PyneCore runs Pine that the PyneSys compiler has converted to Python. PineForge transpiles Pine to C++ and compiles it to a .so. Different speeds, different parity trade-offs, different distribution stories. Neither is wrong, but you can’t bolt one onto the other without rewriting both.
Distribution
A compiled .so could let sellers ship strategies without exposing their source: the marketplace idea, planned and not built. That is a different product from PyneCore.

We use PyneCore as a second source: the benchmark in the engine repository, on engine main, grades PineForge and PyneCore on the same 201 strategies against TradingView. Where the two engines disagree, the diff shows where to look.

Source: benchmarks/results/summary.md and indicator_comparison.md in pineforge-engine, commit 6b45f510

Why not extend Backtrader

Backtrader is the workhorse of Python algo trading. Solid, well-loved, and the wrong shape for this job. It’s a Python-native backtesting framework that happens to support custom strategy classes. Pine is a different language with different semantics. You can’t fake request.security() lookahead, intra-bar order processing, or oca_name exit groups by writing more Python.

And again: a Backtrader strategy is Python source, distributable as Python source. The compiled-binary marketplace requires a transpile step that produces a deployable artifact. Backtrader’s surface doesn’t expose that.

What’s next

Planned

Optimization
Hosted search over a strategy’s inputs, against an objective you choose.
Studio
A browser workspace to backtest, optimize and compare, running the same engine you can run locally today. The waitlist hears first.
Marketplace
Sellers publish compiled strategies with their own license limits; buyers run them on their own data without seeing the source.

The engine