Pine Script™ → Python

in Seconds

Your Pine Script™ code, running in Python

This is not another AI / LLM based Pine Script™ converter.
Instead, it's a deterministic, reliable compiler!

//@version=6
strategy("BarUpDn Strategy", overlay=true,
         default_qty_type = strategy.percent_of_equity,
         default_qty_value = 10)

maxIdLossPcnt = input.float(1, "Max Intraday Loss(%)")

strategy.risk.max_intraday_loss(maxIdLossPcnt,
     strategy.percent_of_equity)

if (close > open and open > close[1])
    strategy.entry("BarUp", strategy.long)

if (close < open and open < close[1])
    strategy.entry("BarDn", strategy.short)
"""
@pyne
"""
from pynecore.lib import close, input, open, script, strategy


@script.strategy('BarUpDn Strategy', overlay=True, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
def main(
    maxIdLossPcnt=input.float(1, 'Max Intraday Loss(%)')
):
    strategy.risk.max_intraday_loss(maxIdLossPcnt, strategy.percent_of_equity)
    if close > open and open > close[1]:
        strategy.entry('BarUp', strategy.long)
    if close < open and open < close[1]:
        strategy.entry('BarDn', strategy.short)

Once Upon a Pine

Once upon a time, in the depths of the Forest of Bits, during the Age of Code, there lived a language. A secret, yet magical tongue, which could only be summoned from a single tower. There, the arcane coders forged their patterns, conjuring the spirits of price and time — and every spark born of this language was bound to that place.
But one day... the story continues…

Who is PyneSys For?

Developers

Integrate Pine logic into your Python backtests and research pipelines.

Bot Creators

Turn Pine logic into Python code your automation stack can run, monitor, and control.

Pine Script™ Users

Move your TradingView indicators and strategies into Python, while keeping the logic you built.

"From Pine Script™ to Python — ready to test, automate, and run anywhere."

How It Works

1

Upload Your Pine Script™

Simply upload your Pine Script™ code through our web interface or API.

Upload Pine Script
2

We Convert to Python (PyneCore)

Our system translates your Pine Script™ to Python code that uses our PyneCore library. Generated code is human-readable. You can use and develop it easily.

Convert to Python
3

Run on Your Machine

Execute the generated Python code locally or on your own server. PyneCore allows you to run your compiled scripts easily with its friendly CLI.

Run on Your Machine
4

Use API for Seamless Integration

Integrate with our API using your personal key for automated workflows. PyneCore can run your scripts directly from the CLI if you have PyneSys API key.

API Integration

Try It For Free

Not ready to subscribe yet?
Convert up to 3 scripts for free with our Discord bot.

Go to #pine-compiler-bot channel in PyneSys Discord Server and use the /pyne-help command.

Discord Bot Preview
Join Our Discord
3 free conversions

What Our Community Says

Unfiltered messages from our Discord — typos and all.

# community-feedback
M
M•••• 2025-08-05 22:00
Perfect :) Thank you so much for your efforts, you're really helping us all! (edited)
❤️ 1
@e• hey @PyneSys , I was wondering if i could convert very long and complex pinescript codes that have 400+ lines of code into a working python script ready to be displayed on my own backtest module
A
A•••• 2025-08-07 13:10
I had converted 1208 line of pinescript into industrial grade python script. So definitely possible
👍 2
@PyneSys Not yet – right now PyneCore is designed for running scripts on historical data...
a
a•••• 2025-08-22 11:46
Thanks! Awesome product! (edited)
❤️ 1
s
s•••• 2025-08-23 07:45
I am so happy to be here... and knowing that others are thinking out of the box regarding pinescript.
s
s•••• 2025-08-23 13:14
nice job... this is a good projet... because TV has too much restrictions!!
❤️ 1
@l••• this thing is useless
M
M•••• 2025-09-26 19:49
No it's not.
k
k•••• 2026-04-21 17:46
oh my gosh this project is so damn cool
like no joke ive been coding pinescript for over a year now but i have no idea how backtesting in python works
this is exactly what i needed
❤️ 1
k
k•••• 2026-04-21 18:04
i found it
s
s•••• 2026-05-06 04:06
this project is seriously so cool
i really enjoy coding in pinescript, so it's awesome to find something like this
❤️ 1

Real messages from our Discord community. Usernames anonymized for privacy.

Pricing Plans

Choose the plan that fits your needs. All plans include API access.

🌱 Seed

$8 / month

Perfect for individuals who want to support open-source PyneCore development while getting access to the basic Pine Script to Python conversion.

  • 5 script conversions per day
  • 1 script conversion per hour
  • 1 API key

🌿 Sprout

$20 / month

Ideal for traders and developers who need regular conversion services for personal projects.

  • 30 script conversions per day
  • 5 script conversions per hour
  • 2 API keys

🌲 Grower

$28 / month

For serious traders and developers who need more frequent conversions and multiple API keys.

  • 100 script conversions per day
  • 60 script conversions per hour
  • 5 API keys

🌳 Forest

$45 / month

Our premium plan for professional traders and development teams who need high-volume conversions.

  • 300 script conversions per day
  • 120 script conversions per hour
  • 10 API keys

Plan Comparison

SeedSproutGrowerForest
Price$8$20$28$45
Daily Limit530100300
Hourly Limit1560120
API Keys12510
Max Script Size25 KB100 KB150 KB300 KB

Most scripts convert 1:1 and run as-is. When one doesn't, the generated Python is readable, so a small manual edit usually gets it working. See the FAQ and the PyneCore Compatibility page for details.

Enterprise & Reseller Solutions

High-volume API-only access with credit-based pricing. Perfect for agencies, resellers, and businesses integrating PyneSys into their own products.

🪵 Firewood 10K API Only

$500 one-time payment

10.000 Credits
1 credit → 1 script conversion

  • 10,000 credits included
  • Valid for 90 days
  • Rate limit: 50-100 requests/min
  • 10 API keys
  • Max script size: 300 KB

🪵 Firewood 25K API Only

$1,000 one-time payment

25.000 Credits
1 credit → 1 script conversion

  • 25,000 credits included
  • Valid for 180 days
  • Rate limit: 50-100 requests/min
  • 10 API keys
  • Max script size: 300 KB

🪵 Firewood 50K API Only

$1,500 one-time payment

50.000 Credits
1 credit → 1 script conversion

  • 50,000 credits included
  • Valid for 365 days
  • Rate limit: 50-100 requests/min
  • 10 API keys
  • Max script size: 300 KB
Get Firewood Credits
High-volume API access for businesses

Need custom limits or dedicated servers? Contact us for tailored solutions.

CLI & API Integration

The PyneCore CLI is the primary interface today — run your Pine Scripts locally with a single command. For backend automation, the same compiler is exposed as an HTTP API. Pick whichever fits your workflow; both call the same deterministic compiler.

PyneCore CLI

# One-shot: compile via the API, then run locally on your OHLCV data
pyne run my_strategy.pine BTCUSDT_1D.ohlcv

# Or compile only — produces a .py file you can edit and commit
pyne compile my_strategy.pine

The CLI re-compiles only when the .pine file is newer than its generated .py, so unchanged scripts never hit the API. Set your key once via PYNESYS_API_KEY, the --api-key flag, or workdir/config/api.toml.

HTTP API

# POST a Pine Script — get readable PyneCore Python back as plain text
curl -X POST https://api.pynesys.io/compiler/compile \
  -H "Authorization: Bearer $PYNESYS_API_KEY" \
  -F "script=@my_strategy.pine"

POST /compiler/compile returns the compiled Python directly. Identical scripts are served from the server-side cache instantly and do not consume your compile quota. Full interactive reference at api.pynesys.io/docs.

Key Features

  • Personal Bearer API keys — create, rotate, or revoke any time from your dashboard
  • Two key types: subscription keys (plan limits) and Firewood Credits (pay-as-you-go, ideal for high-volume B2B use)
  • Smart server-side cache — re-compiling the same Pine Script™ returns instantly and does not bill your quota
  • Mtime-aware CLI — skips the API entirely when your .pine source hasn't changed
  • Output is human-readable PyneCore Python — read it, edit it, version-control it
  • Interactive OpenAPI reference at api.pynesys.io/docs

Data Handling & Security

Script Privacy

We only cache your scripts for conversion purposes. They are never shared with third parties without your permission.

User Data

User account management is handled securely through Logto authentication.

Payment Security

All payment processing is handled by Stripe with bank-level security standards.

API Security

API keys can be revoked at any time. All connections are secured with HTTPS.

Join Our Community

Connect with other traders, developers, and the PyneSys team.

Frequently Asked Questions

No. We love TradingView and use it as a guide and development platform. Our system is not meant to replace it, but to complement it. TradingView is the best place to develop and test your Pine Script™ code — we help transform it into executable Python code.

It automatically transforms your Pine Script code into Python-compatible "Pyne" code. This Pyne code can be run in an open-source system called PyneCore, which preserves Pine semantics but in Python form.

Classic compiler! We don't use any LLM/GPT-based generation, only deterministic transformation rules (full lexical parser → AST → transform → codegen pipeline). This ensures reliable, predictable conversion results every time.

Not necessarily. The converter is currently available through an API. You can use it through our web interface or with the PyneCore CLI. The CLI automatically communicates with the API and converts the code if it's not already in the cache.

With the PyneCore system, it can run on any platform: Linux, macOS, Windows. The system requires Python 3.11+ and doesn't use cumbersome external dependencies.

Pine Script™ is a TradingView trademark. We're not copying or reverse-engineering it, but building an independent system that is functionally compatible with it. This means the same logic and behavior applies, but in Python language, with full control and customizability.

Most scripts do — and we fix bugs quickly when you report them. A couple of things worth knowing:

The compiler currently covers more of Pine Script™ than the runtime can execute. You can check what PyneCore supports on the Compatibility page. If a script doesn't run out of the box, the generated Python is human-readable, so it's a strong starting point — usually a small adjustment is enough.

Found a bug or a missing feature? Please flag it on Discord or GitHub — that's the fastest way to get it fixed.

PyneSys currently supports Pine Script™ v6 only. If you have an older script (v4 or v5), you can convert it to Pine Script™ v6 using the TradingView Pine Script™ editor before converting it to Python.