TradingView Strategy Tester (2026): Backtest, Properties, Report

Run the Strategy Tester after Add to chart: Overview, List of Trades, commission/slippage Properties. How it differs from MT5 — AlfaTactix exports .pine, you test on TradingView.

📖 7 min read

📝 1,236 words

🏷️ Pine Script and TradingView

Share this article:

Which numbers can carry a decision

The Strategy Tester shows a lot of figures and they are not of equal weight. Some can support a decision on their own, some are meaningless without another number next to them, and some are partly the product of an assumption rather than of data.

The three that matter

Total closed trades — read this first. It is your sample size, and it governs how much any other number is worth. Under a hundred trades, the rest of the panel is describing a handful of events. This is also the figure to check against the 9,000-order backtest cap [2]: a strategy that hit the cap stops adding trades, and the curve flattens in a way that looks like a failing strategy rather than a truncated test.

Maximum drawdown — the number that decides whether you could have held it. Net profit tells you where the strategy ended; drawdown tells you what you would have had to sit through to get there. A curve you would have abandoned in month four did not earn its final figure.

The List of Trades — the only raw data in the panel. Everything else is derived from it. It is also the only tab that can be checked against the chart, which makes it the only tab that can catch a broken backtest.

The ones that mislead on their own

FigureWhy it needs a companion
Net profitmeaningless without the trade count and the drawdown
Percent profitablea strategy can be right 80% of the time and still lose; pair it with average win against average loss
Profit factorover few trades it is noise; over a compounding position size it flatters
Any of them, on percent-of-equity sizingcompounding inflates a mediocre edge over a long test — retest on strategy.fixed before believing it

And the part that is an assumption

Every exit on a bar whose range contained both your stop and your target was decided by the broker emulator's inference about the intrabar path, not by recorded prices. The rule is deterministic and documented [1], and it is set out in the risk-management article.

So before trusting an equity curve, it is worth knowing what fraction of its exits that rule decided. On a scalping strategy with tight stops it can be most of them.

Two things the panel will not tell you

How much history it actually used. That depends on your TradingView account plan, not on the script [2] — from 5,000 bars on lower plans to 40,000 on Ultimate. Two people running the same script get different reports, which is why a profit figure is not reproducible unless the plan is stated with it.

How many variations you tried before this one. The panel reports each test in isolation and has no idea the previous nine existed. That count belongs with the result, and why it matters is the single most under-discussed thing about backtesting.


Auditing the List of Trades

Five checks, cheapest first. None needs you to read the script. Together they catch nearly every way a backtest can be measuring something impossible.

1. Did the fill price exist?

Pick three trades at random. For each, find the bar on the chart and ask whether the fill price falls inside that bar's high-low range.

A fill outside the bar's range is the strongest single signal of a future leak or a non-standard chart type. It takes a minute and it is the one check that can end the investigation immediately.

2. Is the entry on the bar you expected, or the one before?

If your condition is evaluated on a bar's close, the entry belongs on the next bar's open. An entry on the same bar as the signal means the strategy acted on information the bar had not finished producing — repainting and lookahead covers how that happens.

3. How many exits are on bars containing both your levels?

Count them. Every one of those was resolved by the emulator's assumption about the path price took through the bar [1], not by recorded data. A high proportion means the equity curve is substantially a product of that heuristic.

4. Are the trades spread across the whole date range?

Scroll the list and look at the dates. Two patterns are worth stopping for:

  • all the profit in one short period — the strategy caught one move, and the rest of the range is noise around it
  • trades stop partway through — either a condition became permanently false, or the test hit the 9,000-order cap [2] and simply stopped

The second is easy to mistake for the first.

5. Does the trade count support the statistics?

Back to sample size. If the list holds forty trades, the profit factor on the Overview tab is describing forty events. Read the Overview numbers with the count in front of you rather than on its own.

What a clean audit does and does not prove

Passing all five means the backtest is measuring something possible. It does not mean the strategy is profitable, and it does not mean the result will repeat. A curve-fitted strategy passes every check here — the code is clean, the fills are real, the costs are honest, and the parameters happen to be the ones that worked on this exact history. That failure leaves no trace in the trade list at all.

The only defences against it are out-of-sample evidence and an honest count of how many variations you tried, both of which live outside this panel: why the count is part of the result.

Before any of this, set costs

An audit of a zero-cost backtest is wasted effort. Confirm commission_type, commission_value and slippage are set in the strategy() declaration first — details in the cost parameters — then audit. A strategy that survives the five checks and real costs is worth the time.



Tactix AI — Studio vs Guide

Tactix AI is AlfaTactix’s product assistant brand (open Tactix AI).

  • Tactix Studio turns a one-sentence strategy description into a draft across Timeframe, Signals, Filters, and Risk in the visual Strategy Builder. You review and edit every field before Code Generator writes MQL5 or Pine Script.
  • Tactix Guide explains the step you are on — what to fill, what a control means, or how to phrase a rule — without dumping untested source code.

That is form-first automation: the LLM never replaces Code Generator, and you keep plan limits and real-time validation.

Frequently Asked Questions

On the chart after you Add to chart a strategy() script. Open the Strategy Tester panel and read Overview / Performance / List of Trades. Official concepts: Strategies [1]. Attach workflow: Pine Editor setup.

No. Different engine, data, and UI. MT5 guide: Backtest EA in Strategy Tester. Shared ideas (costs, drawdown): Backtesting academy.

Because costs were ignored. Set commission and slippage in strategy Properties / strategy() args — strategy() [3]. Park and Irwin (2007) stress costs (DOI [4]).

No. We export .pine. You run TradingView’s tester. Path: Build without codingCode Generator.

Indicators do not produce a full strategy report. Need strategy(...)What is a TradingView strategy · Script structure [5].

Align builder Step 5 with exits and sizing — Pine strategy risk. Then re-test.

References

  1. TradingView. Strategies. https://www.tradingview.com/pine-script-docs/concepts/strategies
  2. TradingView. Limitations. https://www.tradingview.com/pine-script-docs/writing/limitations
  3. TradingView. Pine Script® language reference manual. https://www.tradingview.com/pine-script-reference/v6/
  4. Park, C.-H., & Irwin, S. H. (2007), Journal of Economic Surveys. What do we know about the profitability of technical analysis?. https://doi.org/10.1111/j.1467-6419.2007.00519.x
  5. TradingView. Script structure. https://www.tradingview.com/pine-script-docs/language/script-structure