A strategy tester plays your rules over past prices and hands you a report. Here is how the four built-in testers work, from their own docs, which numbers in the report matter, and how many trades it takes before any of them mean something.
November 17, 2026
15
min to read
The short answer
A strategy tester replays a trading rule on past prices and reports what it would have done: every trade, net profit, max drawdown, profit factor and more. TradingView’s runs Pine Script strategies, MetaTrader 5’s runs Expert Advisors, NinjaTrader’s Strategy Analyzer runs NinjaScript, and Ethy tests rules you describe in plain English.
A strategy tester is the part of a trading platform that takes a set of rules, walks them bar by bar through past prices, fills the orders those rules would have sent, and writes up the result. You get a list of simulated trades, an equity curve and a page of statistics. Most testers can also keep running on new bars as they arrive, which is called forward testing.
When people search for a strategy tester they usually mean one of three things: TradingView’s Strategy Tester (its help center now calls the panel the Strategy Report), the Strategy Tester inside MetaTrader 5, or a phone app with the same name. If you try an app, check what it actually does. A tester replays your rules on price history; a trade journal only stores trades you type in by hand.
This guide is about the testers themselves: how each one fills orders, which settings change the answer, and how to read the report. For a wider comparison that includes Python libraries and QuantConnect, see best backtesting software. For the method, with one real backtest worked from start to finish, see how to backtest a trading strategy.
| Tester | Where the rule comes from | What it does well |
|---|---|---|
| TradingView Strategy Tester | A Pine Script strategy: built in, from the community, or your own | Results sit under the chart you already use; finer intrabar fills on Premium and Ultimate |
| MetaTrader 5 Strategy Tester | An Expert Advisor, MetaTrader’s automated program | Several tick models, optimization on local, remote and cloud agents, a forward period |
| NinjaTrader Strategy Analyzer | A NinjaScript strategy, coded in C# or generated by its Strategy Builder | Walk-forward optimization, basket tests and Monte Carlo runs |
| Ethy | A rule you describe in plain English | Tests the exact rules that would run live, with a training window and a held-out test window |
Before you go live, size each trade from its stop with the position size calculator.
A TradingView strategy is a Pine Script program that places simulated orders. You add one from the Indicators menu (built-in ones sit under Technicals, then Strategies; others under Community), and, in the words of its help center, “the Strategy Report opens automatically when you add any strategy.” One strategy runs on a chart at a time. The report has four parts: Metrics (the equity chart and key figures), Performance analysis, Trades analysis, and the List of trades.
TradingView’s broker emulator only knows each bar’s open, high, low and close, so it has to guess the path in between. Its Pine Script docs spell out the guess: if the open is closer to the high, it assumes price went open, high, low, close. When a bar touches both your stop and your target, that guess decides which one filled. Users with Premium and Ultimate plans can override it with lower-timeframe data. In July 2026 the old “Using bar magnifier” checkbox became a Bar detalization menu, according to the Pine release notes, and the bar magnifier article notes that a strategy can request at most 200,000 bars of that lower-timeframe data.
History is the other limit. With the default testing range the report keeps individual data for the latest 9,000 trades. Deep Backtesting tests “all available historical data” for a symbol, up to two million bars and one million trades, on Premium and higher plans, and shows its results only in the report, not on the chart.
| Property | Default | Why it matters |
|---|---|---|
| Initial capital | 1,000,000, in the symbol’s currency | Set your real account size, or dollar figures in the report mean little |
| Order size | A fixed quantity, a cash amount or a percent of equity | A percent of equity compounds; a fixed size does not |
| Pyramiding | How many entries in the same direction | Each extra entry adds risk the headline numbers can hide |
| Commission | None unless you set one | A strategy that trades often looks far better with no costs |
| Slippage | 0 ticks | Added to market and stop fills; set at least the spread |
| Long and Short leverage | Replaced the margin inputs in July 2026 | Decides when the simulation forces a margin call |
| Recalculate on every tick | Off | TradingView warns that “strategies using this option will repaint” |
Defaults are from TradingView’s strategy properties page and the Pine docs, which say that “if not specified, the strategy applies no commission to filled orders.” If you would rather have an AI assistant write the Pine Script, see Pine Script with AI; to trade a TradingView idea with simulated money instead, see how to paper trade on TradingView.
MetaTrader 5 tests Expert Advisors, the automated programs that trade inside the platform. Its help pages describe a test as “its single run with fixed parameters using historical price data,” and you start one by choosing Test in the context menu of an Expert Advisor in the Navigator window. It can also run custom indicators in visual mode, and test strategies that trade several symbols at once.
The biggest choice is how the tester builds price movement inside each bar. The tick generation page lists the modes:
| Mode | What it uses | Trade-off |
|---|---|---|
| Every tick | Generated OHLC and intermediate ticks | The most accurate generated mode, and the slowest |
| Every tick based on real ticks | Ticks recorded by the broker | The help calls it “as close to real conditions as possible” |
| 1 minute OHLC | Only the four prices of each 1-minute bar | Faster, with less detail inside the minute |
| Open prices only | Only each bar’s open on the testing timeframe | The fastest; stops and pending orders may trigger at a price other than the one set, especially on higher timeframes |
| Math calculations | No price history at all | For computations, not for trading rules |
You can also add execution delay: none, a fixed delay (for example your measured ping to the trade server), or a random one, which the help defines as a 90% chance of 0 to 8 seconds and a 10% chance of 9 to 18.
The optimizer runs the same Expert Advisor many times with different inputs. The slow complete algorithm tries every combination. The fast genetic algorithm searches with an evolutionary method and is, in MetaQuotes’ words, “much faster than the first one and is almost of the same quality.” A third mode runs the same inputs on every symbol selected in Market Watch, a quick way to see whether a setting only works on one market. The genetic search ranks passes by a criterion you pick: maximum balance, profit factor, expected payoff, recovery factor or Sharpe ratio, minimum drawdown, a custom value or a complex criterion. You can set aside a forward period of 1/2, 1/3, 1/4 or a custom split, and MetaTrader always uses the later part of the history for it. Runs can spread across local agents, remote agents and the MQL5 Cloud Network.
The test report also prints a History quality figure, “a percentage ratio of correct and incorrect one-minute data.” Look at it before anything else: a test on patchy data is a test of the gaps.
NinjaTrader calls its tester the Strategy Analyzer. Its help guide says it “lets you run historical analysis on your NinjaScript automated trading strategies,” and you open it from New in the Control Center. NinjaScript is C#, but the developer docs add that “the Strategy Builder and wizards generate NinjaScript for you” if you would rather not write code.
The NinjaTrader homepage, which served us its EU edition, says the platform is “always free to use for advanced charting, backtesting and trade simulation.” Its focus is futures.
Ethy works the other way round: you start with words, not code. Describe the idea in plain English, and Ethy shows you the rules it understood, backtests the exact spec that would deploy, lets you optimize it, then deploys it live or on paper in one tap.
| Timeframe | Hyperliquid windows (days) | Spot windows (days) |
|---|---|---|
| 5m | 15 | 15 |
| 15m | 30, 60, 90 | 30, 60, 90 |
| 1h | 30, 90, 180 | 30, 60, 90 |
| 4h | 90, 180, 365 | 30, 60, 90 |
| 1d | 180, 365 | 180, 365 |
The limits matter as much. Ethy tests Hyperliquid perps and spot tokens, so it can’t test a futures broker’s data. Alerts, scanners, research tasks, smart-money and AI-signal automations can’t be backtested; for those Ethy offers paper mode instead. And it presents every result as an estimate on past data. More on the tool itself in Ethy’s backtesting page.
Every tester prints dozens of figures. Five carry most of the weight, and each has a catch.
| Metric | What it is | What to check |
|---|---|---|
| Net profit | The result of all trades; TradingView shows it in currency and percent | Compare it with buying and holding the same market over the same dates, not with zero |
| Max drawdown | The deepest fall from a peak in the equity curve | Ask whether you would really have held on; MT5 shows it on the balance and on equity, which includes open trades |
| Profit factor | Gross profit divided by gross loss (TradingView, MT5) | Above 1 means winners outweighed losers in this test; from a handful of trades it is noise |
| Number of trades | Closed trades, the ones that booked a profit or loss | The fewer there are, the more one trade decides everything else |
| Sharpe ratio | Return above a safe rate, divided by how much returns swing | Don’t compare it across tools: the inputs differ |
The Sharpe ratio is the clearest case of the same name hiding different math. TradingView’s help builds it from monthly returns and subtracts a 2% yearly rate by default. MetaTrader 5’s report assumes that rate is zero. So a strategy can show two different Sharpe ratios on two platforms without anything being wrong.
Here is a quick way to feel it. Suppose a rule truly wins half its trades. The win rate a test shows will land inside these ranges 95% of the time, from the standard binomial approximation:
| Closed trades | Win rate the test may show |
|---|---|
| 10 | 19% to 81% |
| 30 | 32% to 68% |
| 100 | 40% to 60% |
| 300 | 44% to 56% |
At 30 trades, a coin flip can look like a 68% winner or a 32% loser. At 100, the range is still 40% to 60%. Our rule of thumb: below 30 closed trades, read the report as a story, not as evidence; aim for 100 or more, spread over rising, falling and flat markets. Then count how many versions you tried, because the best of fifty variations is weaker evidence than one rule written down in advance. Our backtesting guide has the research behind that.
The tester is only as honest as its settings. These five traps show up in every platform above, and each docs page names its own version.
An optimizer will always find a setting that fit the past. TradingView’s docs warn that an overfit strategy “often fails to perform well on new, unseen data,” and tell you to optimize on in-sample data, then “test the optimized configuration on the OOS data without additional fine-tuning.” MT5’s forward period, NinjaTrader’s walk forward and Ethy’s held-out window are all versions of that advice. Use them, and look at the result once.
A rule must only use what it could have known at the moment it acts. TradingView notes that recalculating after an order fills “can cause lookahead bias on historical bars.” The simple defense: decide on a closed bar and act on the next one.
Some settings make a strategy behave one way on history and another way live. TradingView says strategies that recalculate on every tick “will repaint,” and the setting doesn’t touch historical bars at all. NinjaTrader warns that running “On each tick” can change results, because a signal can be true in the middle of a bar and false at its close. Chart types that rewrite prices, such as Heikin Ashi and Renko, distort fills on both platforms.
All three platforms see bars, not ticks, unless you pay or ask for more detail. TradingView guesses the path from open, high, low and close; NinjaTrader fills from those four points; MT5’s open-prices mode can fill stops at prices you never set. A strategy with tight stops and targets is the most exposed. Test it with finer data before you trust it.
TradingView starts with no commission and zero slippage, and its docs say that without modeling costs “traders may overestimate a strategy’s historical profitability.” Set commission, spread and slippage before you read the first number, and expect a live fill to be a little worse than a simulated one.
All four testers have a free way in. TradingView has a free plan, and its report opens whenever you add a strategy to a chart; the deeper modes, Deep Backtesting and finer bar detail, are on Premium and higher. MetaTrader 5 is a free download, though you need an Expert Advisor to test. NinjaTrader says backtesting is free. Ethy’s Free plan runs backtests on the shortest window of each timeframe, 180 days on the daily, and asks for no card.
Whichever you pick, run your first test like this:
Market, timeframe, entry, exit, stop and size, with nothing left to judgment. “Buy BTC on the daily when it closes above its 20-day high, exit on a close below the 10-day low, risk 1% a trade.”
Find out what commission, spread and slippage the tester assumes, and set them where it lets you, so the first result you see is closer to a realistic one.
Net profit, max drawdown, profit factor and the number of trades. If the trade count is under 30, stop and add history or markets.
Tune on the older data if you must, then run the final version once on the part you kept back.
Let it run on live prices with no money for a few weeks. Our guide to paper trading explains what that can and can’t show.
TradingView has a free plan, and the strategy report opens whenever you add a strategy to a chart. The deeper modes are paid: Deep Backtesting is for Premium and higher, and finer intrabar fills for Premium and Ultimate. Plan tables change, so check TradingView’s comparison page for which report metrics your plan shows.
In the Navigator window, right-click the Expert Advisor you want to test and choose Test. Then pick the symbol, the period, the tick model and any delay, and start the run. The Result tab then shows the profit, the number of trades, and statistics and charts for judging risk.
There is no single number. A profit factor above 1 means gross profits beat gross losses in that test. What makes it believable is everything around it: enough trades, realistic costs and slippage, and a similar result on data the rule was not tuned on. A high profit factor from a dozen trades says very little.
As a rule of thumb, treat fewer than 30 closed trades as an anecdote and aim for 100 or more across different market conditions. Even at 100 trades, a rule that truly wins half the time can show anywhere from 40% to 60% by chance.
They fill orders differently and build the bar’s path differently, their default costs differ, and even the Sharpe ratio uses different inputs: TradingView subtracts a 2% yearly rate from monthly returns, MT5 subtracts nothing. Data from two brokers or exchanges also differs. Line up the settings before comparing.
Not directly: Ethy does not import Pine Script. You can describe the same rule in plain English, and Ethy builds and backtests its own version on its markets, Hyperliquid perps and spot tokens, then shows you the rules it used so you can compare them with your script.
Trading involves risk, including the loss of your money. Ethy AI is a research and trading tool and does not give investment advice or recommendations. Backtests are simulations on historical data and do not predict future results.
Deploy your AI trading agent in one click.
