[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116246":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":44,"updatedAt":45,"readmeContent":46,"aiSummary":47,"trendingCount":15,"starSnapshotCount":15,"syncStatus":17,"lastSyncTime":48,"discoverSource":49},116246,"pynecore-strategies","theonetrade\u002Fpynecore-strategies","theonetrade","PyneCore ports of 449 TradingView community strategies, 471 indicators and 85 Pine libraries, compiled from Pine Script to Python. Backtest them offline on candles from any CCXT exchange, without a TradingView account.","https:\u002F\u002Ftheonetrade.github.io",null,"Python",57,19,55,0,1,2,3,47.1,"MIT License",false,"main",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"algorithmic-trading","backtesting","bitcoin","ccxt","crypto-trading","llm-agent","offline-backtesting","open-source-trading","pine-script","pine-to-python","pinescript","pynecore","python","quant","quantitative-finance","strategy-backtesting","technical-analysis","trading-indicators","trading-strategies","tradingview","2026-11-08 09:33:04","2026-11-23 05:47:12","\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fimages\u002Flogo.png\" height=\"115px\" alt=\"pynecore-strategies\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>TradingView community strategies, running offline in Python\u003C\u002Fstrong>\u003Cbr>\n  449 strategies, 471 indicators and 85 libraries compiled from Pine Script to PyneCore.\u003Cbr>\n  No TradingView account, no browser, no chart.\n\u003C\u002Fp>\n\n## Why\n\nPublic trading strategies exist mostly as Pine Script, so their backtests run only inside a\nTradingView chart. This repository collects the open-source Pine strategies and indicators that\nPyneSys verified against TradingView and compiles them into [PyneCore](https:\u002F\u002Fpynecore.org)\nscripts. PyneCore executes Pine-style code bar by bar in Python, with the same series history,\n`na` handling, broker emulator and drawing objects, so every strategy becomes a command that\nbacktests on any candles you have and writes its trades and statistics to CSV files.\n\nThe scripts can be backtested on any market, including exchanges that TradingView does not list,\nbatch-tested from Python, or fed to a feature pipeline or an LLM agent. The repository is part of\nthe open-source tooling of [TheOneTrade](https:\u002F\u002Ftheonetrade.github.io).\n\n## What is inside\n\n| | Bit-exact | Verified | Total | Compiled to |\n|---|---|---|---|---|\n| Strategies | 384 | 65 | 449 | `scripts\u002Fstrategy_\u003Cname>.py` |\n| Indicators | 458 | 13 | 471 | `scripts\u002Findicator_\u003Cname>.py` |\n| Pine libraries they import | | | 85 | `scripts\u002Flib\u002F\u003CPublisher>\u002F\u003CName>\u002Fv\u003CN>.py` |\n\nThe sources come from [Pyne in the Wild](https:\u002F\u002Fwild.pynesys.io\u002F#scripts), PyneSys' verification\nreport on the 1,000 most-liked open-source Pine scripts on TradingView. Two of its categories were\ntaken:\n\n- **Bit-exact**: on every compared bar PyneCore produced the same IEEE-754 double as TradingView.\n- **Verified**: the output matched TradingView bar by bar and trade by trade within the published\n  tolerance band.\n\nEach original Pine source is kept in [`assets\u002F`](assets\u002F) next to its compiled script, byte for\nbyte as TradingView's *Source code* tab serves it. 25 publications listed in the report had been\nremoved from TradingView by their authors before the download (22 strategies, 3 indicators);\nthey are listed in `assets\u002F\u003Ctype>\u002F\u003Ccategory>\u002Funavailable.txt`. The download and verification\nprocedure is described in [`assets\u002FREADME.md`](assets\u002FREADME.md).\n\nThe corpus mixes Pine versions: 295 sources are v4, 327 v5, 293 v6 and 5 older. PyneComp converts\nv4 and v5 to v6 before compiling and keeps the settings those versions defaulted to (for example\n`margin_long=0` and `close_by_id=True` in the strategy decorator).\n\n## Finding a script\n\nA file name is the TradingView title in snake_case followed by the 8-character TradingView script id:\n\n```\nassets\u002Fstrategy\u002Fverified\u002Fmacd_reloaded_strategy_VO6DY8s1.pine     original Pine Script\nscripts\u002Fstrategy_macd_reloaded_strategy_VO6DY8s1.py               compiled PyneCore strategy\nhttps:\u002F\u002Fwww.tradingview.com\u002Fscript\u002FVO6DY8s1\u002F                      the publication\n```\n\nLibraries keep the path of their Pine import, with `-` in the publisher replaced by `_`:\n`import Trading-IQ\u002FICTlibrary\u002F1` is `assets\u002Flib\u002FTrading-IQ\u002FICTlibrary\u002Fv1.pine` and compiles to\n`scripts\u002Flib\u002FTrading_IQ\u002FICTlibrary\u002Fv1.py`. [`assets\u002Flib\u002Findex.tsv`](assets\u002Flib\u002Findex.tsv) records\nwhere each library was found on TradingView.\n\n## Quick start\n\nRequires Python 3.11+ and [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F).\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Ftheonetrade\u002Fpynecore-strategies.git\ncd pynecore-strategies\nuv sync --python 3.13          # installs pynesys-pynecore[cli,ccxt] into .venv\n```\n\nDownload candles once. The `.ohlcv` file in `data\u002F` is a cache: later downloads append only new\nbars, and every run reads the file offline.\n\n```bash\nuv run pyne data download ccxt:GATE:BTC\u002FUSDT@60 --from 2025-09-25\n```\n\nAny exchange supported by [CCXT](https:\u002F\u002Fgithub.com\u002Fccxt\u002Fccxt) works: `ccxt:BINANCE:BTC\u002FUSDT@60`,\n`ccxt:BYBIT:BTC\u002FUSDT:USDT@1D`, and so on. Gate.io serves only the most recent 10,000 candles per\ntimeframe, which is about one week of 1-minute candles and 14 months of 1-hour candles. A download\nthat ends at \"now\" also stores the candle that is still forming.\n\nBacktest a strategy or run an indicator:\n\n```bash\nexport PYNE_NO_LOGO=1\nuv run pyne run strategy_macd_reloaded_strategy_VO6DY8s1 ccxt_GATE_BTC_USDT_60\nuv run pyne run indicator_supertrend_r6dAP7yi ccxt_GATE_BTC_USDT_60\nuv run pyne run strategy_macd_reloaded_strategy_VO6DY8s1 ccxt_GATE_BTC_USDT_60 --from 2026-08-07 --to 2026-11-07\n```\n\n### Higher and lower timeframes\n\nScripts that call `request.security` need a data file for every timeframe they request. List what\na script needs, download it and pass it with `--security`:\n\n```bash\nuv run pyne run strategy_ict_master_suite_trading_iq_ABYnIcdl ccxt_GATE_BTC_USDT_60 --list-data\nuv run pyne data download ccxt:GATE:BTC\u002FUSDT@1D --from 2021-01-01\nuv run pyne run strategy_ict_master_suite_trading_iq_ABYnIcdl ccxt_GATE_BTC_USDT_60 --security \"1D=ccxt_GATE_BTC_USDT_1D\"\n```\n\nA key is a timeframe (`1D`, `D`, `60`, `1W`) or a symbol, and the option can be repeated.\n\n### Libraries\n\nScripts that import a Pine library load it from `scripts\u002Flib\u002F`, which `pyne run` puts on the import\npath. 55 scripts use libraries (26 strategies and 29 indicators). No extra step is needed: the\ncompiled libraries are in the repository.\n\n## Outputs\n\n| File | Contents |\n|------|----------|\n| `output\u002F\u003Cscript>_trade.csv` | Every entry and exit: time, price, contracts, profit, run-up and drawdown |\n| `output\u002F\u003Cscript>_strat.csv` | Strategy statistics: net profit, drawdown, profit factor, win rate, long\u002Fshort split |\n| `output\u002F\u003Cscript>.csv` | One row per bar: time, OHLCV and the value of every `plot()` |\n| `output\u002F\u003Cscript>_viz.ndjson` | With `--viz`: plot styles and drawing objects |\n| `scripts\u002F\u003Cscript>.toml` | Every input and strategy setting. Uncomment `value = ...` to change one without editing code |\n\nStrategy settings such as `commission_value`, `initial_capital` or `default_qty_value` can be\noverridden in the `.toml` file in the same way as inputs. The scripts keep the costs and position\nsizes their authors set, which differ from script to script.\n\n## Test run\n\nSoftware: PyneCore 6.12.1, Python 3.13, every script compiled by PyneComp v6.0.79.\n\n**Compilation.** All 1,005 sources compiled, and every compiled file passed a Python syntax check.\n\n**Strategies.** Each strategy was backtested on Gate.io BTC\u002FUSDT from 2026-08-07 to 2026-11-07\n(8,833 bars at 15m, 2,209 at 1h, 553 at 4h, no gaps), with daily and weekly files supplied for\n`request.security`.\n\n| Result | Strategies |\n|--------|------------|\n| Completed on all three timeframes | 418 |\n| Completed on some timeframes | 1 |\n| Need data that Gate.io cannot provide for the period: 1, 3 or 5-minute candles | 18 |\n| Need other timeframes that were not downloaded (monthly, 25m, 30m, 2h, 6h, 8h, 12h) | 10 |\n| Stop with `IndexError` inside the script | 2 |\n\n**Libraries.** 23 of the 26 strategies that import libraries completed; the other three request\n5-minute or monthly data.\n\n**Indicators.** All 471 compiled; they were not run in bulk.\n\nThe PyneSys report compared these scripts with TradingView. This repository did not repeat that\ncomparison, and the backtests above were run only to check that the scripts execute.\n\n## Recompiling from Pine Script\n\n`pyne compile` sends a source to the PyneSys cloud compiler. It needs an API key from\n[pynesys.io](https:\u002F\u002Fpynesys.io), passed with `--api-key`, set in `PYNESYS_API_KEY`, or stored in\n`config\u002Fapi.toml`. Git ignores the `config\u002F` folder, so the key is not committed.\n\n```bash\nuv run pyne compile assets\u002Fstrategy\u002Fverified\u002Fmacd_reloaded_strategy_VO6DY8s1.pine -o scripts\u002Fstrategy_macd_reloaded_strategy_VO6DY8s1.py --force\nuv run pyne compile            # without a script: shows your API usage and key expiry\n```\n\n[`tools\u002Fcompile_assets.py`](tools\u002Fcompile_assets.py) compiles the whole of `assets\u002F` into\n`scripts\u002F` with the naming above. The API allows a fixed number of compilations per hour and per\nday; the tool stops when the quota runs out and continues from the same place on the next run.\nProgress is kept in [`assets\u002Fcompile_state.json`](assets\u002Fcompile_state.json), keyed by the SHA-256\nof each source, so only new or edited sources are compiled again.\n\n```bash\nuv run python tools\u002Fcompile_assets.py --status     # progress and quota, uses no quota\nuv run python tools\u002Fcompile_assets.py              # compile until done or out of quota\n```\n\n## Layout\n\n```\nassets\u002F\n  strategy\u002F\u003Ccategory>\u002F     original Pine sources of the strategies, links.txt, unavailable.txt\n  indicator\u002F\u003Ccategory>\u002F    original Pine sources of the indicators\n  lib\u002F                     Pine libraries the scripts import, index.tsv\n  compile_state.json       compilation progress\n  images\u002Flogo.png\nscripts\u002F\n  strategy_*.py            compiled strategies and their input .toml files\n  indicator_*.py           compiled indicators\n  lib\u002F                     compiled libraries\n  constructor.py           a strategy whose regime filter, entry and exit are chosen by inputs\ntools\u002Fcompile_assets.py    batch compiler for assets\u002F\ndata\u002F                      candle cache (.ohlcv ignored by git, .toml symbol info kept)\nconfig\u002F                    api.toml and plugin settings (ignored by git: may hold keys)\noutput\u002F                    run results (ignored by git)\n.pyne                      PyneCore workdir marker\npyproject.toml             uv project depending on pynesys-pynecore[cli,ccxt]\n```\n\n## Working with AI agents\n\nThe project was built with [pynecore-skills](https:\u002F\u002Fgithub.com\u002Ftheonetrade\u002Fpynecore-skills), agent\nskills that teach Claude Code, Cursor and Codex the PyneCore language, the `pyne` CLI and the data\nworkflow:\n\n```bash\nnpx skills add theonetrade\u002Fpynecore-skills\n```\n\n## Disclaimer\n\nThese are research and analysis tools, not trading advice. Past performance does not predict\nfuture returns.\n","这是一个将TradingView社区开源策略、指标和Pine库批量转换为Python可执行代码的项目，支持离线回测。核心功能包括：449个经位级验证的交易策略、471个技术指标及85个Pine库的Pine Script到PyneCore的精准编译；兼容CCXT任意交易所K线数据，无需TradingView账户或浏览器环境；提供与TradingView一致的序列处理、缺失值（na）逻辑、模拟交易引擎和绘图对象。适用于量化交易研究、策略快速验证、多市场批量回测及与LLM代理或特征工程流水线集成等场景。","2026-11-24 04:53:18","CREATED_QUERY"]