pynecore-strategies
pynecore-strategies

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

Loading the Python runtime…
Pine Scriptv4 · v5 · v6
PyneCore Python
Press Convert (Ctrl+Enter). The script is compiled in this tab and is not uploaded anywhere.

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-exactVerifiedTotalCompiled to
Strategies38465449scripts/strategy_<name>.py
Indicators45813471scripts/indicator_<name>.py
Pine libraries they import85scripts/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.

920 found

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 .venv

Download 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-25

Backtest 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-07

Higher 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.csvEvery entry and exit: time, price, contracts, profit, run-up and drawdown
output/<script>_strat.csvStrategy statistics: net profit, drawdown, profit factor, win rate, long/short split
output/<script>.csvOne row per bar: time, OHLCV and the value of every plot()
scripts/<script>.tomlEvery 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.

ResultStrategies
Completed on all three timeframes418
Completed on some timeframes1
Need 1, 3 or 5-minute candles that Gate.io cannot provide for the period18
Need other timeframes that were not downloaded10
Stop with IndexError inside the script2

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