TradingView Backtest & Robustness Lab

TradingView Backtesting Guide: Strategy Tester, CSV Analysis and Robustness

TradingView Backtesting Guide: CSV Analysis & Robustness | SG Group

日本語版

Learn — Backtest Validation Series 01

TradingView Backtesting Guide: Strategy Tester, CSV Analysis and Robustness

The first thing to check in a TradingView backtest is not whether it made a profit. The real work is confirming, step by step, the data quality, repeatability, loss behavior, costs and out-of-sample performance of a strategy. This guide organizes the path from reading the Strategy Tester to CSV analysis, KPI interpretation and robustness testing into a single seven-step workflow, and serves as the entry point to ten specialist articles.

  • Keep the roles of the Strategy Tester, Report and Deep Backtesting distinct
  • Export results to CSV or XLSX and re-read them mechanically
  • Read KPIs together instead of judging on any single number
  • Assess robustness with drawdown, Monte Carlo and out-of-sample tests
Reading timeAbout 12 minutes
UpdatedJuly 13, 2026
ForBeginners to hands-on individual traders
TypeEducational, descriptive commentary

Key takeaways

  • A backtest is not a profit check; it is a staged review from data quality through loss behavior, costs and out-of-sample performance.
  • The Strategy Tester, Strategy Report, Deep Backtesting and forward testing have different roles, so do not conflate them.
  • Export results to CSV or XLSX and re-read the Performance Summary and List of Trades separately.
  • Do not judge KPIs such as net profit or win rate alone; read them alongside trade count, drawdown and expectancy.
  • Every number here is fictional educational data. You can review your own data in the free analysis lab.
Open the table of contents
  1. What a backtest is (the answer first)
  2. Tester vs Report vs Deep Backtesting vs forward
  3. The full picture: seven steps
  4. What to export: Summary vs List of Trades
  5. Reading KPIs: never in isolation
  6. Risk and robustness: drawdown, Monte Carlo
  7. Out-of-sample testing: OOS and walk-forward
  8. Advanced diagnostics: MFE/MAE, costs, portfolios
  9. Common mistakes and how to avoid them
  10. Start free: using the analysis lab
  11. Backtest health self-check
  12. Learning roadmap (10 articles)
  13. Frequently asked questions
  14. Summary and next step
  15. Related reading

The answer first

What TradingView backtesting really is (the answer first)

TradingView backtesting is the process of mechanically reproducing a set of trading rules on historical chart data to see how a strategy behaved in the past. The first thing to internalize is that the object of the review is not the final net profit. Net profit moves dramatically with how you set your assumptions, so deciding whether a strategy is good or bad from that figure alone leads to bad judgment.

A sound backtest checks for fragility in this order. First data quality (no look-ahead or repainting), then repeatability (does the same result appear under the same conditions), then loss behavior (how deep does it sink, how long are the losing streaks), then costs (have spread, commission and slippage been included), and finally out-of-sample performance (does it hold up on periods not used to build it). Only after working through these five layers step by step can you say you have actually validated a result.

This article is the parent page for ten specialist articles. It points to the entrance of each stage and links to the individual articles for deeper procedures. Every number and figure shown here is fictional educational data; none of it is a recommendation of a specific strategy or a suggestion of future results.

Clarifying terms

Strategy Tester, Strategy Report, Deep Backtesting and forward testing

Sorting out similar-sounding terms before you start saves confusion later. A strategy is the script itself, written in strategy() form, which defines the trading rules. The Strategy Tester is the panel that runs that strategy and lets you control and view the results. Inside the panel are the Strategy Report (Performance Summary), which collects the aggregate figures, and the List of Trades, which shows each trade individually.

Deep Backtesting is a mode that runs over a longer period or finer data; it is heavier than a regular backtest but lets you increase the sample. Forward testing is a separate check that looks forward in time, closer to live operation, rather than at the past. Because reproducing the past (backtesting) and observing the future (forward testing) have different aims, avoid using the result of one to speak for the other.

Button names and panel layouts can change. Confirm the latest UI names in the official documentation, and do not assert specifications you cannot verify. If you want to move on to the exact steps for pulling out a CSV, the guide on exporting Strategy Tester data to CSV is the concrete next stop.

The full picture

The full picture: seven steps from backtest to robustness testing

Do not treat validation as a one-off. Start by locking your assumptions and move in one direction until you are looking at out-of-sample stability. The SVG below lays out those seven stages from left to right (it scrolls horizontally).

Seven-step flow from backtest to robustness testing A left-to-right diagram connecting seven stages with arrows: lock assumptions, run the test, export CSV, check data quality, review KPIs, stress and Monte Carlo, and out-of-sample and parameter stability. It is a conceptual diagram with no numbers. STEP 1 Lock assumptions Period / symbol / timeframe STEP 2 Run the test Strategy Tester STEP 3 Export CSV Summary / Trades STEP 4 Data quality Check for look-ahead STEP 5 Review KPIs Read several together STEP 6 Stress Monte Carlo STEP 7 OOS / stability Out-of-sample testing Validation starts by locking assumptions and moves one way to out-of-sample stability
Concept diagramThe seven-step flow. This is a conceptual overview with no numbers. Each stage links to the body text and the relevant specialist article.

Steps 1 to 3 are about pulling out the raw material correctly, steps 4 to 5 are about reading that material correctly, and steps 6 to 7 are about testing whether it stays intact when the assumptions break. The sections below walk through each stage in order.

Pulling out the material

What to export: Performance Summary vs List of Trades

Staring at the numbers on screen is not validation. The starting point is to export the results to CSV or XLSX so you can re-read them in your own hands. There are broadly two kinds of information you can export.

  • Performance Summary: aggregate values such as net profit, win rate, Profit Factor, maximum drawdown and trade count. Good for grasping the whole picture of a strategy on a single sheet.
  • List of Trades: the trade-by-trade detail of each entry and exit, profit and loss, and holding period. Good for examining the sequence of losing streaks, the source of drawdowns and exit efficiency in fine detail.

Aggregate values are convenient, but they are also rounded results. The order of losing streaks and the depth of a drawdown can only be tracked accurately from the detail (the List of Trades). Because CSV column layouts vary by environment, being able to map columns on the import side keeps things stable. The concrete export procedure is collected in the CSV export guide.

Reading correctly

Reading KPIs: never judge on a single number

Net profit, win rate, average win and loss, expectancy, Profit Factor, Sharpe, maximum drawdown and trade count — pull out any one of these on its own to evaluate a strategy and you will misread it easily. The following is an illustration using fictional educational data. The numbers themselves carry no meaning; they exist only to show how the metrics should be cross-checked against one another.

Table 1: KPI illustration using fictional educational data (Sample Strategy A; not real performance)
MetricIllustrative valueImpression in isolationRead alongside
Total trades214A reasonable countSpread of periods and symbols
Win rate47%Falls short of halfRatio of average win to loss
Average win / average loss+1.56R / −1.00RThe win side is a bit largerWin rate and expectancy
Expectancy (per trade)+0.20ROn the positive sideTrade count and dispersion
Profit Factor1.38Above 1Maximum drawdown
Sharpe (illustrative)0.82MiddlingReturn distribution
Maximum drawdown−15.3%Looks containedRecovery period and streaks

In this example the win rate is 47%, below half, but because the average win (+1.56R) is larger than the average loss (−1.00R), expectancy comes out on the positive side at +0.20R per trade. Dismiss it as a “weak strategy” from the win rate alone and you miss that relationship. Conversely, a Profit Factor of 1.38 tells you nothing about whether the risk is bearable until you read it alongside the −15.3% maximum drawdown and the sequence of losing streaks. The definitions and reading of each individual metric are detailed in the guide on reading backtest results.

Testing for fragility

Risk and robustness: drawdown, Monte Carlo and stress tests

Two strategies with the same net profit can have completely different characters depending on how deeply they sank on the way to that profit. The figure below pairs an equity curve on top with an underwater curve below it (the decline from the running peak), aligned vertically. Both use fictional educational data.

Equity curve paired with underwater curve (fictional educational data) The top panel is an equity curve rising from a starting value of 100 to 132. The bottom panel is an underwater curve showing the decline from the running peak, with the deepest fall at minus 15.3 percent. All values are fictional educational data. Equity curve (start = 100 / fictional data) 130 110 95 Trough Underwater curve (decline from running peak / fictional data) 0% -16% Max DD −15.3% ← Test period (left = start / right = end; ticks evenly spaced for illustration) →
Fictional educational dataEquity curve and underwater curve. Maximum drawdown is −15.3% (the same illustrative dataset used in the body text and tables). This is a descriptive visualization, not a suggestion of performance.

Looking at the top panel alone, it appears to climb steadily; overlay the bottom panel and you can see there was a stretch where it sank −15.3% from its running peak. Whether you could withstand that decline in live trading is best thought about not in currency but in terms of the percentage and the time it took to recover. How to calculate drawdown, recovery periods, and metrics such as Calmar and Ulcer are covered in the maximum drawdown analysis guide.

Beyond that, Monte Carlo analysis tests whether this result simply happened to occur in that particular order. By reshuffling or resampling the sequence of trades, it shows the depth of losing streaks, the distribution of drawdowns and an indication of the risk of ruin. How to read sequence risk and the risk of ruin is explained in detail in the Monte Carlo and risk-of-ruin guide.

Testing out of sample

Out-of-sample testing: OOS, walk-forward and parameter stability

The most commonly overlooked pitfall in validation is only ever checking a result on the period you built it on. Of course it looks good on the period used to build it (in-sample, IS); the question is whether it also holds up on the period you did not use (out-of-sample, OOS). A design that splits the data, decides conditions on one part, and confirms them on the other is called walk-forward. The thinking behind the split is made concrete in the walk-forward and out-of-sample testing guide.

Another thing that matters is parameter stability. When only one particular parameter setting produces a standout result, that may not be the strategy’s true ability but overfitting to that data. Checking whether nearby values continue smoothly (a “plateau”) or collapse when you nudge them slightly (a “cliff”) makes it easier to judge whether the choice is sound. How to spot overfitting is covered in the overfitting and parameter stability guide.

The idea of not deciding on a single KPI can be drawn as a wheel. You look at five perspectives at once, and wherever one is low, that is the weak spot (the values are fictional educational data).

Five-perspective diagnostic wheel (fictional educational data) A five-axis radar showing Data quality 70, Sample sufficiency 60, Loss profile 55, Cost realism 65 and Out-of-sample stability 45. The values are fictional scores from 0 to 100, and out-of-sample stability is the lowest. Data quality 70 Sample sufficiency 60 Loss profile 55 Cost realism 65 OOS 45 Fictional 0–100 scores (a lower axis is a weaker area)
Fictional educational dataA five-axis diagnostic wheel. Out-of-sample stability (45) is the lowest, illustrating that it is the next area to work on. It is not a pass/fail or ranking verdict.

Advanced diagnostics

Advanced diagnostics: MFE/MAE, cost sensitivity and multi-strategy portfolios

Once the basic validation is in place, the next step is exit efficiency, cost assumptions and the perspective of the whole portfolio. These are not mandatory, but they start to matter when you are refining a strategy.

  • MFE / MAE: look at how much unrealized profit (MFE) and unrealized loss (MAE) each trade carried while it was open, to visualize whether your take-profit and stop-loss placements are reasonable. Details are in the MFE and MAE exit analysis guide.
  • Cost sensitivity and stress tests: progressively tighten spread, commission and slippage to see how far the assumptions have to worsen before performance breaks down. Details are in the cost sensitivity and stress test guide.
  • Multi-strategy portfolios: taking correlation and allocation between strategies into account, look at the combined drawdown to see the whole picture. Details are in the multi-strategy portfolio guide.

Avoiding pitfalls

Common mistakes and how to avoid them

Most validation failures collapse into the same handful of patterns. If any of these ring a bell, that is your entry point to the next article to read.

  • Look-ahead bias (repainting): using information from a candle that has not yet closed. Catch it early with a data-quality check.
  • Missing costs: running without spread, commission or slippage, which makes results look better than live trading.
  • Too few trades: a small sample where the result is swayed by chance.
  • Period or symbol bias: depending on a single instrument or a single market condition and failing elsewhere.
  • Picking a single best parameter: choosing one standout point without checking the stability of its neighbors.
  • Post-hoc storytelling: inventing reasons to fit the numbers that came out. Fix your hypothesis in advance.

Start free

Start free: using the TradingView Backtest & Robustness Lab

Everything covered so far can be tried directly on your own data with the TradingView Backtest & Robustness Lab. It is designed in stages by depth of analysis: confirm the basics free first, and consider higher-tier features once you need them. Because pricing can change, this article does not fix a figure; check the current scope on the plan page.

Table 2: Depth of analysis and scope (features follow the current plan page as the single source of truth; prices are not fixed in the text)
TierMain useRepresentative capabilities
FreeEveryday basic checksCSV/XLSX import, core KPIs, equity/drawdown, Monte Carlo, risk of ruin, stress tests, robustness score, basic reports
ProSave, compare, dig deeperSave multiple analyses, strategy-version comparison, data-quality and KPI-reliability diagnostics, return-distribution/drawdown deep dives, rolling statistics, cost sensitivity, Excel/XLSX export
PremiumAdvanced robustness testingWalk-forward, OOS reliability, parameter stability, rolling robustness/regime detection, multi-strategy portfolios, MFE/MAE, stress grids, batch reports, custom CSV parsers

This tool mechanically aggregates, diagnoses and visualizes the backtest results you load; it is not investment advice, a buy/sell signal, a forecast, a performance guarantee, automated trading, order execution or a source of real-time market data. Depending on your needs, you can also make use of the free TradingView indicator collection you can add to charts, and a cross-comparison of SG Group’s financial tools.

Self-check

Backtest health self-check

The check below is an educational self-assessment. It does not issue a pass/fail or a trading decision; it only indicates which article might be worth reading next. Your input stays in the browser and is not sent anywhere. First, here is a static reference guide by number of checks.

Table 3: Reference by number of checks (static fallback; educational guide bands)
Items you could checkArticle worth reading next
0–3Start with the basics: CSV export (BT02) and reading KPIs (BT03)
4–5Move to the risk side: drawdown (BT05), Monte Carlo (BT04) and costs (BT09)
6–7Move out of sample: walk-forward (BT06) and overfitting (BT07)

Check the items that apply (7 items; unit = number checked)

Currently 0 / 7 items. If you want to confirm the basics first, reading CSV export (BT02) and reading KPIs (BT03) is a good place to start.

Learning roadmap

Learning roadmap (10 articles)

Starting from this parent guide and working through the cluster in beginner, intermediate and advanced order builds up the full picture of validation.

FAQ

Frequently asked questions

What do I need to backtest on TradingView?
You can begin basic testing by applying one strategy (a strategy-type script) to a chart and opening the Strategy Tester panel. To improve the quality of the test, prepare your timeframe and data range, cost settings such as spread, commission and slippage, and a CSV or XLSX export so you can review the results later. The exact export steps are covered in the CSV export guide.
Are the Strategy Tester and the Strategy Report the same thing?
It helps to think of them as the same results shown in different ways. The Strategy Tester is the panel that runs and controls the test, and inside it you find a report view that summarizes aggregate values (the Performance Summary) along with the List of Trades. Regular backtesting and Deep Backtesting differ only in run mode, while forward testing is a separate, forward-looking check. Names and specifications can change, so confirm them in the official documentation.
Can I export TradingView backtest results to CSV?
Yes. From the Strategy Tester you can export the Performance Summary of aggregate values and the trade-by-trade List of Trades. Column layouts vary by environment, so it is easier to work with the data when your import tool can map columns. Recalculating KPIs and drawdown mechanically from the CSV lets you verify the figures rather than taking the on-screen numbers at face value.
Does a high win rate mean a strategy is good?
A win rate alone is not enough to judge a strategy. If a single loss is large, expectancy and Profit Factor can deteriorate even when the win rate is high. Read the win rate together with the ratio of average win to average loss, the number of trades, and the maximum drawdown. The relationships between these metrics are covered in detail in the guide on reading backtest results.
How many trades are enough for a backtest?
There is no universal minimum. The fewer trades you have, the more the result is swayed by chance, and the same KPIs become less reliable. As a rough guide, a few dozen trades feels thin, and stability improves as you add samples across periods, instruments and market conditions. The uncertainty of a small sample can be made visible with Monte Carlo analysis.
What does Monte Carlo analysis test?
It reshuffles or resamples the order of trades to see how much the result depends on that particular sequence happening to occur. It helps you gauge the depth of losing streaks, the distribution of drawdowns, and an indication of the risk of ruin. It is a statistical reference based on the data you load, and it does not guarantee future results.
How much can I analyze on the free plan?
The free analysis lab lets you import CSV or XLSX files and review core KPIs, the equity curve and drawdown, Monte Carlo, risk of ruin, stress tests, a robustness score and basic reports. A natural way to use it is to start free and consider a higher plan once you need to save multiple analyses, compare strategy versions, or run deeper diagnostics such as walk-forward. Check the plan page for the current scope.
Do backtest results guarantee future performance?
No. A backtest is a reproduction on historical data, and the result changes when assumptions, data quality, costs or market conditions change. Robustness testing is not about being right about the future; it is about seeing how resistant a strategy is to breaking when its assumptions no longer hold. This article is descriptive commentary, not investment advice.

Summary

Summary: the answer to the main question and your next step

What you should really check in a TradingView backtest is not whether it made a profit. It is the work of confirming data quality, repeatability, loss behavior, costs and out-of-sample performance in one direction across seven steps. Net profit and win rate are only the entrance; the character of a strategy only becomes visible once you bundle trade count, drawdown, expectancy and robustness together and read them as a whole.

As a practical checklist: (1) lock your assumptions (period, symbol, timeframe, costs) first, (2) export the results to CSV and re-read them, (3) do not judge KPIs in isolation, (4) look at how it sinks with drawdown and Monte Carlo, and (5) confirm resistance to breaking with OOS and parameter neighborhoods. Hold to these five points and you will not go far wrong.

Read next

BT02: How to Export TradingView Strategy Tester Data to CSV — start by pulling out the results correctly.