Pine Script v5 & v6 → Python

Turn Pine Script into
readable Python, instantly.

Paste your indicator or strategy and get clean, runnable Python back — with variable names preserved, diagnostics explained, and every construct regression-tested against real TradingView semantics.

99.7%compile rate on 1,909 real scripts
99.1%run clean end-to-end, bar by bar
maxulp=0bit-exact against the reference oracle

Converter

Pine Scriptinput
Python ready

Compilation runs server-side on the same engine that passed bit-exact regression on 1,909 scripts. Nothing is stored — your source is compiled in memory and discarded.

Why Pine2Py

A real compiler, not a text swap

Not a regex transpiler. A real compiler pipeline with an auditoriable runtime.

Readable output

Your variable and function names are preserved. The generated Python diffs cleanly against later Pine edits — audit it, edit it, ship it.

Bit-exact core

The Python runtime is deterministic across platforms (pure Python, fdlibm-accurate math) and matches the reference oracle to the last ULP on the sample suite.

Strategy support

strategy.entry, strategy.exit, position sizing, commissions and the broker emulator all run — the full matching model, not a stub.

Honest diagnostics

Constructs that can't be translated are reported, never silently dropped. You always know exactly what was translated and what wasn't.

Multi-timeframe ready

request.security across timeframes, lower-timeframe tuples, sessions and calendars — the parts that break naive converters are first-class here.

Built for automation

Output is plain Python with a stable surface — wire it into your own data feeds, backtests or live pipelines without touching TradingView again.

How it works

Three steps — first 3 conversions free

1

Create your free account

Sign in with your email — we send you a 6-digit code, no password to remember. Your free account includes 3 free conversions.

2

Paste & convert

Any Pine Script v5 or v6 indicator or strategy — the parser is a full Pine front-end, not a pattern matcher. You get a single readable .py file back, plus diagnostics for anything unsupported.

3

Run it anywhere

The output runs bar-by-bar in pure Python against your own OHLCV data — no TradingView account, no rate limits.

FAQ

Questions, answered

Which Pine Script versions are supported?

Pine v5 and v6 — the current TradingView surface. Older v3/v4 scripts should be upgraded in TradingView first (the editor does it in one click).

Is the output exactly what TradingView computes?

The core (TA functions, series semantics) is regression-tested bit-exact against a reference oracle. TradingView itself is not bit-exact reproducible across its own versions, so we guarantee determinism of our runtime instead — same input, same output, every run, every platform.

Can it convert strategies, not just indicators?

Yes. Strategies compile and run through a full broker emulator: entries, exits, pyramiding, OCA groups, trailing stops, commissions and slippage. Backtest reports come from the runtime, not from TradingView.

What happens with constructs you don't support?

They are reported as explicit diagnostics attached to the conversion — nothing is silently wrong. The vast majority of real-world scripts (1,909 tested) compile with zero diagnostics.

Do you store my scripts?

No. Your source is compiled in memory and discarded. Nothing is logged, stored or used for training.

Which runtime do I need to run the output?

Use the Pine2Py runtime — PyneCore 6.10.11 plus the Pine2Py patches, downloadable here (2 MB). Install stock PyneCore from PyPI first for its dependencies (pip install "pynesys-pynecore[cli]==6.10.11"), then put the unzipped folder on your PYTHONPATH ahead of site-packages. Stock PyPI PyneCore is not a supported runtime: scripts using text.valign_* or ta.* calls inside UDT methods fail on it. The full patch list ships in the download as PATCHES.md.

Can I use the output commercially?

Yes — the generated Python is yours. The runtime is open source under Apache-2.0; keep its license notice when you redistribute it.

Pricing

Simple pricing

Start free. Upgrade when you convert for a living.

Free

$0/month
  • Create a free account — 3 free conversions included
  • Full v5/v6 language surface
  • Indicators & strategies
  • Diagnostics & examples
  • Community support
Start converting
Most popular

Pro

$12/month
  • Everything in Free
  • Higher rate limits & batch API
  • Priority conversions of new features
  • Email support

Payments handled securely by our merchant of record — card, PayPal, Apple Pay.