Why I built another strategy backtester

I've spent plenty of time modifying Pine Script strategies and comparing different settings. Testing one change is easy. The tedious part starts when you want to check years of performance, compare different exits, or understand why the same strategy performs well in one period and badly in another.

That's exactly where this project started. I wanted one place to paste a Pine strategy, run it against historical data, and get a report that goes deeper than a win rate and a profit figure.

The result is Pine Backtest Studio. It's the tool I wanted for my own research, and now anyone can use it for free.

A proper dashboard, not just a green profit number

The first thing you'll notice is the dashboard. It gives you an immediate view of how the strategy behaved: net profit or loss, win rate, profit factor, expectancy per trade, total trades, maximum drawdown, average win and loss, and Sharpe ratio.

Then come the charts. The balance curve tells the story of the account over time. Monthly returns make it easier to spot strong and weak periods. The win/loss split, long-versus-short results and weekday performance help you see where the strategy's edge might actually be coming from.

Current V2 Pine Backtest Studio dashboard layout with Net Profit or Loss as the first summary tile, equity curve area, monthly results and directional analysis panels
The redesigned V2 dashboard layout. This capture shows its empty state before a backtest, so the performance values are intentionally blank.

Advanced analytics are where it gets interesting

I built the detailed analysis because a profitable backtest doesn't always mean a comfortable one. A strategy might have a good final result but spend a long time below its previous equity high. Another might have a modest win rate but make much more on its winners than it loses on its losers.

There are a few things I always want to check before I take a backtest seriously. They're now available in the studio without having to export everything into a spreadsheet.

RISK & DRAWDOWNMaximum drawdown and recovery

See how deep the losing periods went, plus the distance from the previous equity peak.

RISK-ADJUSTED RETURNSSharpe, Sortino and Calmar

Compare returns with volatility and downside risk, not just the final profit.

PERFORMANCE OVER TIMEMonthly and weekly P&L

Find out whether the strategy works across different periods or relies on a handful of good weeks.

TRADE QUALITYExpectancy and average win/loss

See how much each trade contributes on average and whether the winners justify the losses.

LOSING STREAKSLongest win/loss sequences

Get a clearer feel for the stretches you'd need to sit through.

TRADE BREAKDOWNLongs, shorts and weekdays

Discover which trade direction and entry days contributed most to the outcome.

Advanced performance analysis screenshot showing Sharpe ratio, Sortino ratio, realized drawdown, expectancy per trade and average win-loss ratio
Advanced risk and return metrics, including Sharpe, Sortino, drawdown and expectancy. View full image.
Realized equity drawdown timeline with dollar loss and the closed trade history table
A separate realized-equity drawdown chart and individual trade log. View full image.
Weekly strategy performance chart with profitable periods, best week, worst week and downloadable period ledger
Weekly P&L breakdown, with profitable periods and best/worst weeks. View full image.
Winning and losing streak dashboard with trade quality, long versus short profit and loss and largest winner and loser
Winning and losing streaks, payoff quality and long/short breakdown. View full image.

These advanced-report screenshots use synthetic demonstration candles, not actual historical market data or evidence of a profitable trading strategy. The V2 interface may differ slightly from the captured views.

And if you prefer working with the raw numbers, you can export individual trades and period performance to CSV. I still use spreadsheets for some comparisons, but now I don't need one just to answer a basic question about the strategy.

How to backtest a Pine Script strategy for free

I wanted the process to be simple enough that someone could open the site for the first time and know exactly where to begin.

1Import price data

Drop in an OHLCV CSV from your preferred source. Choose the market, timeframe and date range you want to explore.

2Add your Pine Script

Paste your strategy or open a .pine file. The built-in example is there if you just want to explore.

3Run and analyze

Set your contract details and trading costs, run the backtest, then dig into the charts, statistics and trade log.

That's it. Change the script, adjust the settings and run it again. Whether you're comparing two stop-loss settings or trying a completely different strategy, there's no backtest-run quota to worry about.

Import once, save your favorite datasets

Historical data was another part I wanted to improve. The studio accepts standard CSV price data, and you can import multiple files to build a longer history for the same market. It also supports different chart intervals, so you can test how a strategy behaves on more than one timeframe.

The new Data Library makes it easier to get started with markets such as XAUUSD, XAGUSD, GBPUSD, EURUSD and NAS100. It includes useful data-source shortcuts and a way to pin your favorites.

Once you've imported a dataset, you can save it in your browser and load it again later. You can also download a CSV copy whenever you want. That means less time preparing files and more time actually testing ideas.

Pine Backtest Studio V2 data library with instrument shortcuts, favorite stars, CSV import area and saved local datasets
The V2 Data Library, with shortcuts for popular markets, CSV import and browser-local dataset saving. The app does not distribute licensed third-party historical prices.

Trade costs are part of the experiment

A strategy can look good before fees and much less exciting after them. That's why there are controls for commissions, tick size, point value and position sizing, along with an optional Bybit TradFi Gold CFD cost calculator for testing spread and other broker-cost assumptions.

It's useful for questions like: what happens if the spread doubles? Does a shorter holding period still make sense once costs are included? How much does position sizing change the drawdown? You can adjust the assumptions and run another test straight away.

A free TradingView Strategy Tester alternative

TradingView is still where I do much of my chart work. This project is a companion for the testing side. If you already have a Pine Script strategy and want to experiment with your own historical data, Pine Backtest Studio gives you another place to do that without needing a paid backtesting service.

It supports Pine Script v5 and v6 strategies through the PineTS engine, with a full Pine editor, price chart, strategy trades and detailed reports.

A quick technical note: PineTS supports many Pine strategies, but it's a separate engine from TradingView, so some script features and order fills can behave differently. Check important results against your preferred reference.

What can you use it for?

My obvious use case is testing Pine strategies over longer histories, but I can see it being handy for several kinds of work: comparing strategy versions, trying different session windows, testing stop-loss changes, checking win/loss streaks, exploring instrument differences, or simply understanding what the metrics in a backtest report actually mean.

If you need a strategy to start with, I've published the Gold Breakout 15M Pine Script and a Supertrend + DEMA reversal strategy on this site. You can experiment with those or bring your own.

For a free Pine Script v6 example to study in TradingView, see the No-Wick EMA Retest Strategy guide and download.

Frequently asked questions

Is Pine Backtest Studio completely free?

Yes. No subscription, credit card or login is needed to run strategies. There is no built-in limit on how many tests you can run.

Can I use Pine Script v6?

Yes. You can paste or import compatible Pine v5 and v6 strategy code. Use a strategy() script to generate backtested trades.

Can I test five or ten years of data?

Yes, if you import the historical candles for that period. The current browser limit is 400,000 candles per dataset, which leaves plenty of room for longer 15-minute backtests.

Can I compare different versions of my strategy?

Absolutely. Edit the Pine code or its settings, run another test and compare the performance. You can export the trade list to keep a record of each version.

Do I need to install anything?

No. The backtester runs directly in a modern desktop browser. Your strategy code and imported CSVs are processed locally.

Free Pine Script Backtester · Ready to use

Give your strategy a proper backtest.

Don't stop at the first profitable chart. Test the difficult years, inspect the losing trades and see what the numbers have to say.

Open Pine Backtest Studio ↗ Unlimited runs · Advanced analytics · CSV import · Free to use

Found a bug or need help importing data, configuring a script or understanding a backtest? Email [email protected]. I'm happy to help you get it working.

CW.
Written by CW

Building free Pine Script tools and sharing practical TradingView experiments.