Pine Script Tester Online Free: Out-of-Sample Judge
Writing a Pine Script strategy in TradingView takes minutes. Checking whether the rule holds up outside the candles you tuned it on takes a separate test. A free online Pine Script tester running in your browser lets you run that out-of-sample check with no install and no account.
Short answer: paste a Pine v5 strategy into Strategy Arena's free online judge. It replays the rule locally on BTCUSDT candles (1D, 4h or 1h) or your own CSV candles, keeps the most recent 20% sealed, and reports activity, return versus holding, drawdown, fees, and a test against chance. It reads simple indicator scripts cleanly and states plainly when a script is unsupported. If yours is unsupported or tested on another market in TradingView, export the List of trades CSV and use the TradingView audit dossier.
What TradingView's Strategy Tester does not measure
TradingView's Strategy Tester plots entries, checks fills bar by bar, and reports what one setting returned on the visible chart. It does not measure four checks needed before treating a backtest as a lead to test on past data:
- No held-out period before tuning. Adjusting lengths or stops while watching net profit update lets every candle shape your choice.
- No count of variants tried. Testing thirty parameter sets and keeping the best raises the odds of luck, yet the report shows only the final run.
- No test against chance. The report shows a buy-and-hold figure next to your result, but it does not test whether a lead over holding is larger than what random markets produce.
- Easy-to-miss defaults. Omitting
commission_valueor sizing at one contract makes results look cleaner than a percentage-of-equity replay with fees.
Paid TradingView plans add historical bars, making a test longer rather than stricter.
The held-out period
An out-of-sample split divides the candles chronologically:
- Training period (oldest 80%). Used to observe behaviour and compute training statistics, including the Deflated Sharpe ratio.
- Sealed period (most recent 20%). Kept aside for the final verdict.
A sealed window stays meaningful only if you stop tuning once you view it. Tweaking parameters to improve the 20% holdout turns it back into training data.
In the online judge, four measured steps must pass for a Survives verdict:
| Step | What is checked | Threshold |
|---|---|---|
| Activity | Trades on training and sealed periods | At least 10 trades (30 independent events in certified mode) |
| Gain vs holding | Positive sealed return ahead of buy-and-hold | Sealed return > 0% and > buy-and-hold |
| Trials counted | Training Deflated Sharpe ratio | At least 95% |
| Chance | SPA test against buy-and-hold | At most 5 of 100 random markets doing as well |
Two extra steps — another market and a future forward period — are marked as not measured by one online run. Four out of four remains research on past data.
Pasting a Pine script into the free browser judge
Open the free online judge. WebAssembly runs the replay in a local Web Worker: your Pine code is not sent to the server unless you choose to publish it on a share card.
Here is a simple EMA 9/21 crossover script the judge reads cleanly (its built-in example):
//@version=5
strategy("EMA Crossover 9/21", overlay=true, pyramiding=0, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, process_orders_on_close=true, margin_long=0)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
if (ta.crossover(fast, slow))
strategy.entry("Long", strategy.long)
if (ta.crossunder(fast, slow))
strategy.close("Long")
Every execution detail is explicit: Pine v5, strategy(...), 100% of equity sizing, 0.1% commission, and process_orders_on_close=true.
To test it or your own script:
- Pick the candles. Use BTCUSDT (
1Dfull history,4hover 3 years, or1hover 1 year), or drop your own OHLCV CSV (up to 60 MB, read locally). - Paste your Pine v5 strategy. If you paste a whole AI reply, the judge extracts the fenced code block containing
strategy(...)automatically. - Click Judge and read the report. You get the verdict (
Survives,No evidence of an edge yet,No evidence of an edge, for now, orNot enough trades to judge yet), the four steps, a log-scale chart of the 20% sealed window, fees, drawdown, and the sealed trade list.
On 1 November 2026, checking the judge against TradingView on BINANCE:BTCUSDT 1D across 8 scripts matched 2,433 of 2,433 closed trades on dates and 2,418 on exact prices. Other scripts can still differ.
What the judge does not read. It does not read every Pine script. Dynamic loops (for, while), arrays, matrices, maps, tick trailing stops (trail_points, trail_offset), most strategy.risk.* guards and request.security on another symbol are outside its scope, as are indicator(...) scripts, which place no orders. For calc_on_order_fills=true, the judge offers a one-click fixed version without it. When a script cannot be read, the judge says so and names the line instead of guessing.
When to export the List of trades and use /en/dossier instead
Switch to the TradingView audit dossier when:
- Your script uses unsupported Pine constructs that the browser judge refuses rather than approximates.
- You already tested the rule on stocks, indices, forex, or another pair in TradingView and do not want to prepare a candle CSV.
In TradingView's Strategy Tester, open List of trades (or Trades) and download the CSV. Per TradingView's pricing page (read 20 November 2026), CSV trade export is not in free Basic — it starts at Essential (Essential, Plus, Premium, Ultimate). See our List of trades export guide for the exact steps and columns.
Upload that CSV to /en/dossier, with no account and no Pine script needed:
- Free preview: compounded result before and after a cut date (default: last 30%) and the effect of +0.10% extra fees per order.
- Paid dossier (€9, one-time payment): adds Monte Carlo on trade order and drawdown, comparison against holding, sub-periods (year by year), fee sensitivity, and one improvement lead to test on past data with an AI prompt.
The dossier does not replay your rule: it computes only on your exported trades. Inspect the format on the example dossier (77 synthetic trades from a random walk).
Sources
- Strategy Arena free online judge (WebAssembly worker, 80%/20% split, four measured steps).
- Strategy Arena TradingView audit dossier and example dossier.
- Strategy Arena trade check on
BINANCE:BTCUSDT 1D(1 November 2026, 8 scripts, 2,433 closed trades). - TradingView pricing page ("Export trades in CSV", 20 November 2026) and Pine Script v5 documentation.
Frequently asked questions
Does the free online Pine Script tester send my code to a server? No. The engine runs locally inside your browser through WebAssembly and a Web Worker. Your CSV candle file never leaves your machine, and the Pine script is sent only if you choose to publish it on a public share card.
Can the browser judge read every Pine Script strategy? No. Only part of Pine v5 is supported. Many simple scripts, such as the EMA crossover in this article, are read as they are; when a script is unsupported, the judge refuses it and names the line instead of guessing.
What is the difference between the online judge and the audit dossier? The free online judge replays Pine v5 code on BTCUSDT candles or your own CSV with the last 20% sealed. The audit dossier does not replay your rule: it analyzes a TradingView List of trades CSV on any market, with a free preview and a €9 full dossier.
Does a Survives verdict mean the strategy will work in the future? No. Survives only means the rule passed the four checks on that sealed past period. It is research on past data, not investment advice.
Research on past data, not investment advice. Strategy Arena gives no investment advice, executes no broker orders, and is not affiliated with TradingView. TradingView plan features are quoted from its pricing page on 20 November 2026 and may change.
⚠️ Disclaimer — This article is for informational and educational purposes only. It does not constitute investment advice or a buy/sell recommendation. Past performance does not guarantee future results. Strategy Arena is an educational simulator with virtual capital. Always do your own research before making investment decisions.