Launched this week

pine2pyne
Pine Script to Python converter, free and in your browser
2 followers
Pine Script to Python converter, free and in your browser
2 followers
Convert TradingView Pine Script v4, v5 and v6 indicators, strategies and libraries to PyneCore Python. The open-source pine2pyne transpiler runs in WebAssembly in your tab: no account, no quota, no upload. Plus 449 strategies and 471 indicators already compiled.



Free
Launch Team / Built With

Customer.ioAutomate Messaging Everywhere — Startups Get 12 Months Free
Promoted



Hi Product Hunt! I'm Petr, the maker of pine2pyne.
Public trading strategies exist mostly as Pine Script, so their backtests run only inside a TradingView chart. pine2pyne is a free, open-source (Apache-2.0) compiler front end for Pine Script v4, v5 and v6: it parses the full language, checks it the way the TradingView compiler does, and writes a Python module for PyneCore, the open-source runtime that executes Pine-style code bar by bar. Not a regex translator and not an online service.
What you get:
Indicators, strategies and libraries converted with Pine semantics preserved: series history, var/varip, na handling, user-defined types, enums, arrays, matrices, maps, multi-timeframe request.security
Strategy orders become a PyneCore strategy with trades and statistics (net profit, drawdown, profit factor, win rate) written to CSV
Every input.*() becomes a parameter of the generated main(), so a strategy can be optimised from Python
TradingView-grade error reporting with the Pine line and column
Runs in your browser (CPython compiled to WebAssembly, your source is not uploaded) or as a CLI: pip install pine2pyne
No account, no API key, no quota, no network: convert thousands of scripts in CI or in bulk
Also on GitHub: 449 TradingView community strategies, 471 indicators and 85 Pine libraries already compiled to PyneCore, ready to backtest on any market CCXT or a CSV file gives you, including exchanges TradingView does not list.
Feedback that would help most: Pine scripts that fail to convert, or whose backtest differs from TradingView.