跳到正文
DEV Community· Petr Tripolsky·· 3 天前AI 評分60

pine2pyne 免費將 TradingView Pine Script 轉成可讀 Python

🌳 Pine Script into readable Python for Free

AI 導讀

Petr Tripolsky 開發免費編譯器 pine2pyne,將 TradingView 的 Pine Script 策略與指標轉成 Python 原始碼。

正文

Cover image for 🌳 Pine Script into readable Python for Free

Petr Tripolsky

Download the converted 449 strategies and 471 indicators via this link

pine2pyne

I built a free compiler and translated over 1000 popular trading strategies and indicators from TradingView into Python source code!

No need to open TradingView or use a browser; you can run indicators and batch-test trading strategies right on your local machine!

  • 449 trading strategies: Includes TradingView community strategies that can be called directly from Python for testing.
  • 471 technical indicators: Includes publicly available indicators such as SuperTrend and MACD, supporting standalone execution.
  • High-precision conversion: 384 strategies and 458 indicators are bit-for-bit consistent, and the rest are verified with tolerance checks.
  • Multi-exchange data: access candlestick charts from exchanges such as Binance, Bybit and Gate via CCXT.
  • Batch testing: CSV output including trade records, win rate, drawdowns and profit/loss ratios for convenient secondary analysis.
  • AI agent integration: supports integration with tools such as Codex and Claude Code for researching, modifying and testing strategies.

Where the tool's value lies

Its most valuable feature is the mass conversion of publicly available strategies from the TradingView community into programmable research material in Python. For example, to study BTC strategies, you can run various scripts in batches, compare backtest results, and then filter out the trading logic that deserves deeper verification.

Updated EULA

Unfortunately, the updated PyneComp usage agreement does not permit mass conversion of Pine Script, even within a subscription

Canceled Subscription

PyneSys will unilaterally block the subscription you paid for without explanation

OpenSource

If you want to use PyneCore with AI agents for mass analysis of strategies for profitability in a fast-moving market, you have no choice: you will have to use pine2pyne.

Install

pip install pine2pyne

Convert

pine2pyne strategy.pine -o strategy.py

來源:DEV Community · dev.to