Use Pine Script indicators and strategies in FreqTrade — without rewriting them

TL;DR: You see a promising indicator or full strategy on TradingView, you trade with FreqTrade, and you don’t want to rewrite the Pine code in Python. Two working examples (CC0) bridge the gap on top of an open-source runtime (Apache 2.0). Repo at the bottom.

The situation

You find an indicator on TradingView that looks good, or you have a working Pine strategy. You want it inside FreqTrade. Today’s options:

  • Rewrite Pine in Python — days, sometimes weeks of work, and your version still drifts from the TV reference. Most of the time you’d spend isn’t writing the code, it’s validating that ta.rsi() and your rsi() produce the same numbers to enough decimals.
  • TV alerts + webhook bridge — extra latency, hard dependency on TradingView’s alert system, fragile under volume.
  • Trade manually on the TV chart from the Pine signals — works, but at that point you’re not really automated.

What the examples do

PyneCore is a Pine-compatible Python runtime (Apache 2.0). It runs Pine-style scripts as plain Python with the same calculation model — ta.rsi(), ta.sma(), strategy.entry(), the whole namespace. There are two patterns to combine it with FreqTrade.

Pattern A — Pine indicators inside your Python strategy

Keep your trading logic in Python (FreqTrade’s populate_entry_trend etc.), but the indicator logic comes from a Pine script. The example wires RSI + Bollinger Bands into the FreqTrade DataFrame as plain columns. Drop in any compiled Pine indicator — three lines of bridge code per indicator.

Pattern B — Pine strategy generates the signals

Your TradingView strategy stays exactly as it is. PyneCore runs it on the candles, FreqTrade just executes the buy/sell signals it produces. Useful when you have a strategy you trust on TV and don’t want to port the entries, exits, and risk logic to Python.

What it costs to plug in

Two files in user_data/strategies/:

  • pynecore_bridge.py — DataFrame ↔ PyneCore glue (~165 LOC, copy as-is).
  • Your Pine script file — either compiled with PyneComp from a .pine source, or written by hand against the same Pine API.

Then freqtrade backtesting --strategy ... works normally.

What this is not

  • Not a broker, not a webhook service. FreqTrade still does the execution.
  • No paid tier required. The runtime is Apache 2.0, the examples are CC0. There’s a hosted Pine→Python compiler if you don’t want to write PyneCore scripts by hand, but it’s optional — the examples include hand-written ones.

Repo

github.com/PyneSys/pynecore-examples

Look at 05-freqtrade-indicators/ and 06-freqtrade-strategy/ — each has its own README with copy-paste instructions.


Originally posted on r/pinescript.