
Pine Script to Python,
converted in your browser
Paste a TradingView indicator, strategy or library in Pine Script v4, v5 or v6 and get a PyneCore script that backtests offline on any candles you have. Free and open source. No account, no API key, no quota: the compiler runs inside this tab and your source is not uploaded.
pine2pyne 0.2.13Pyodide 0.29.5Apache-2.0
Runs on your machine
The page loads CPython compiled to WebAssembly and the pine2pyne wheel, then works without a server. Close the network tab and it still converts.
Pine line and column
A script TradingView would refuse is refused here with the rule and the position. Warnings do not stop the output. Click a message to jump to the place in the source.
The same tool as the CLI
For batches use pip install pine2pyne and pine2pyne "src/*.pine" -o out/. The output is the same file.
TradingView community strategies, running offline in Python
Public trading strategies exist mostly as Pine Script, so their backtests run only inside a TradingView chart. The pynecore-strategies repository collects the open-source Pine strategies and indicators that PyneSys verified against TradingView and compiles them into PyneCore scripts. PyneCore executes Pine-style code bar by bar in Python, with the same series history, na handling, broker emulator and drawing objects, so every strategy becomes a command that backtests on any candles you have and writes its trades and statistics to CSV files.
The scripts can be backtested on any market, including exchanges that TradingView does not list, batch-tested from Python, or fed to a feature pipeline or an LLM agent. The repository is part of the open-source tooling of TheOneTrade.
What is inside
| Bit-exact | Verified | Total | Compiled to | |
|---|---|---|---|---|
| Strategies | 384 | 65 | 449 | scripts/strategy_<name>.py |
| Indicators | 458 | 13 | 471 | scripts/indicator_<name>.py |
| Pine libraries they import | 85 | scripts/lib/<Publisher>/<Name>/v<N>.py |
The sources come from Pyne in the Wild, PyneSys' verification report on the 1,000 most-liked open-source Pine scripts on TradingView. Bit-exact: on every compared bar PyneCore produced the same IEEE-754 double as TradingView. Verified: the output matched TradingView bar by bar and trade by trade within the published tolerance band. Each original Pine source is kept in assets/ next to its compiled script, byte for byte as TradingView's Source code tab serves it.
The compiled files in the repository were produced by PyneComp v6.0.79. “Convert here” loads the original Pine source from GitHub and compiles it with pine2pyne in this tab.
- strategy20 200 sma strategy
- strategy2mars ma bb supertrend
- strategy2x take profit move stop loss to entry
- strategy3 candle strike stretegy
- strategy3 ema rsi with trail stop free990 low tf
- strategy3 ema stochastic rsi atr
- strategy3commas bot
- strategy3commas bot dca backtester signals free
- strategy3ls 3 line strike strategy kintsugi trading
- strategy3x supertrend strategy mel0ntek v1
- strategy5 ema strategy
- strategy5min macd scalp by joel
- strategy72s strat backtesting adaptive hma pt 1
- strategyabcd strategy
- strategyaccurate buy sell 5 mins tf by rr
- strategyadaptive fibonacci pullback system fibonacciflux
- strategyadaptive trend flow strategy with filters for spx
- strategyadvanced position management mr rakun
- strategyadvanced vwap pullback strategy trend template qualifier
- strategyadx dmi trend strategy
- strategyai supertrend strategy presenttrading
- strategyai supertrend x pivot percentile strategy presenttrading
- strategyall in one strategy
- strategyalphatrend strategy
Run a converted script
Requires Python 3.11+ and uv. The repository already contains every compiled script and library.
git clone https://github.com/theonetrade/pynecore-strategies.git
cd pynecore-strategies
uv sync --python 3.13 # installs pynesys-pynecore[cli,ccxt] into .venvDownload candles once. The .ohlcv file in data/ is a cache: later downloads append only new bars, and every run reads the file offline. Any exchange supported by CCXT works.
uv run pyne data download ccxt:GATE:BTC/USDT@60 --from 2025-09-25Backtest a strategy or run an indicator. A file you converted above goes into scripts/ the same way.
export PYNE_NO_LOGO=1
uv run pyne run strategy_macd_reloaded_strategy_VO6DY8s1 ccxt_GATE_BTC_USDT_60
uv run pyne run indicator_supertrend_r6dAP7yi ccxt_GATE_BTC_USDT_60
uv run pyne run strategy_macd_reloaded_strategy_VO6DY8s1 ccxt_GATE_BTC_USDT_60 --from 2026-08-07 --to 2026-11-07Higher and lower timeframes
Scripts that call request.security need a data file for every timeframe they request. List what a script needs, download it and pass it with --security.
uv run pyne run strategy_ict_master_suite_trading_iq_ABYnIcdl ccxt_GATE_BTC_USDT_60 --list-data
uv run pyne data download ccxt:GATE:BTC/USDT@1D --from 2021-01-01
uv run pyne run strategy_ict_master_suite_trading_iq_ABYnIcdl ccxt_GATE_BTC_USDT_60 --security "1D=ccxt_GATE_BTC_USDT_1D"Outputs
output/<script>_trade.csv | Every entry and exit: time, price, contracts, profit, run-up and drawdown |
output/<script>_strat.csv | Strategy statistics: net profit, drawdown, profit factor, win rate, long/short split |
output/<script>.csv | One row per bar: time, OHLCV and the value of every plot() |
scripts/<script>.toml | Every input and strategy setting. Uncomment a value to change it without editing code |
Test run
PyneCore 6.12.1, Python 3.13. All 1,005 sources compiled, and every compiled file passed a Python syntax check. Each strategy was backtested on Gate.io BTC/USDT from 2026-08-07 to 2026-11-07 at 15m, 1h and 4h, with daily and weekly files supplied for request.security.
| Result | Strategies |
|---|---|
| Completed on all three timeframes | 418 |
| Completed on some timeframes | 1 |
| Need 1, 3 or 5-minute candles that Gate.io cannot provide for the period | 18 |
| Need other timeframes that were not downloaded | 10 |
Stop with IndexError inside the script | 2 |
The PyneSys report compared these scripts with TradingView. The repository did not repeat that comparison: the backtests were run only to check that the scripts execute.
Working with AI agents
The project was built with pynecore-skills, agent skills that teach Claude Code, Cursor and Codex the PyneCore language, the pyne CLI and the data workflow.
npx skills add theonetrade/pynecore-skills