Start free

Pine Script® indicators

Backtest with the indicators you actually trade.

On the Max plan, paste the Pine Script® code of an indicator and a developer rebuilds it by hand for the chart your replay runs on. It is not an automatic conversion, which is exactly why it works, and when something can't be reproduced you are told what and why.

The request

From pasted code to your chart. All of it happens inside a backtest session.

  1. Open your Pine Script® requests in a session.

    Start a new indicator with a name, an optional one line description of what it should do, and the code.

  2. Read the scan while you paste.

    As you type, a scan flags what might not reproduce on the chart, line by line: dynamic labels, boxes, tables, requests to other symbols or timeframes. It is advice, and it never blocks a request.

  3. A developer converts it by hand.

    Line by line, for the chart the replay runs on. What can't be matched exactly is adapted as faithfully as possible, and you are told what changed.

  4. Follow it to ready.

    Every request shows where it is: pending, in progress, ready, or not possible, with the reason when it can't be done.

What converts

Honest about what the chart can draw. The scan tells you before you send. These are the constructs it looks for.

Reproduced as written

Indicators built from plots and calculations on the chart's own symbol and timeframe: the scan finds nothing to flag, and the indicator should come back faithful.

Adapted with care

  • Dynamic labels, boxes, drawn lines and polylines
  • Requests to other symbols or timeframes
  • Arrays, matrices, maps, user defined types and methods
  • plotshape, plotchar and plotcandle styles
  • Scripts written before Pine Script® v5

Left out

  • Strategy entry and exit calls: indicators only
  • Tables, which have no chart equivalent
  • Alert conditions, which mean nothing in a backtest
  • Library imports, which are not resolved automatically

Why it matters

A lookalike is a different test.

If your entries depend on a specific indicator, testing with the nearest standard study measures a different strategy. A hand conversion keeps your rules intact, so the replay tests what you actually trade, and the statistics describe your system rather than a cousin of it.

Two requests can be in progress at a time. Pine Script® and TradingView are trademarks of TradingView, Inc.; BacktestFlow is not affiliated with TradingView.

FAQ

Frequently asked questions.

No. Every request is handled by hand by a developer. That is not a limitation we apologise for: it is the reason the result behaves like the indicator you know, instead of an approximation produced by a translator.

No, only indicators. If a script contains strategy entry and exit calls, they are removed: in BacktestFlow the trades are yours to place, which is the point of a manual backtest.

You are told, with the reason. Not everything written in Pine Script® has an equivalent on the chart the replay runs on: tables, for example, have none. Parts that can be adapted are adapted as faithfully as possible, and you are told what changed.

The Max plan. Sending a request and loading a ready indicator on the chart both need it. If you leave Max, your requests stay listed and readable, but the chart stops loading them.

Two can be in progress at a time. When one is completed, you can send the next.

No. Pine Script® and TradingView are trademarks of TradingView, Inc. BacktestFlow uses the TradingView Charting Library for its charts and is not affiliated with TradingView.

Bring your indicator to the replay. Paste the code, keep your rules, read honest numbers.

Pine Script® requests on the Max planFree plan to startRuns in your browser