Tools and comparisons

Strategy tester: how TradingView, MT5, NinjaTrader and Ethy test a strategy

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.

What is a strategy tester?

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.

Four strategy testers, checked 17 November 2026
TesterWhere the rule comes fromWhat it does well
TradingView Strategy TesterA Pine Script strategy: built in, from the community, or your ownResults sit under the chart you already use; finer intrabar fills on Premium and Ultimate
MetaTrader 5 Strategy TesterAn Expert Advisor, MetaTrader’s automated programSeveral tick models, optimization on local, remote and cloud agents, a forward period
NinjaTrader Strategy AnalyzerA NinjaScript strategy, coded in C# or generated by its Strategy BuilderWalk-forward optimization, basket tests and Monte Carlo runs
EthyA rule you describe in plain EnglishTests 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.

How does TradingView’s Strategy Tester work?

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.

How it fills orders

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.

The properties that change the answer

TradingView strategy properties that change a backtest
PropertyDefaultWhy it matters
Initial capital1,000,000, in the symbol’s currencySet your real account size, or dollar figures in the report mean little
Order sizeA fixed quantity, a cash amount or a percent of equityA percent of equity compounds; a fixed size does not
PyramidingHow many entries in the same directionEach extra entry adds risk the headline numbers can hide
CommissionNone unless you set oneA strategy that trades often looks far better with no costs
Slippage0 ticksAdded to market and stop fills; set at least the spread
Long and Short leverageReplaced the margin inputs in July 2026Decides when the simulation forces a margin call
Recalculate on every tickOffTradingView 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.

How does the MetaTrader 5 Strategy Tester work?

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.

Tick models

The biggest choice is how the tester builds price movement inside each bar. The tick generation page lists the modes:

MetaTrader 5 tick generation modes
ModeWhat it usesTrade-off
Every tickGenerated OHLC and intermediate ticksThe most accurate generated mode, and the slowest
Every tick based on real ticksTicks recorded by the brokerThe help calls it “as close to real conditions as possible”
1 minute OHLCOnly the four prices of each 1-minute barFaster, with less detail inside the minute
Open prices onlyOnly each bar’s open on the testing timeframeThe fastest; stops and pending orders may trigger at a price other than the one set, especially on higher timeframes
Math calculationsNo price history at allFor 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.

Optimization and forward testing

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.

What does NinjaTrader’s Strategy Analyzer do?

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.

  • Test types. A plain backtest, optimization, walk forward optimization, multi-objective optimization and basket testing across several instruments.
  • Walk forward. You set an optimization period and a test period, both in days, and the guide is blunt about which one counts: “You evaluate strategy performance on the test data, not on the data you used for the optimization.”
  • Monte Carlo. After a run you can resample its trades with replacement to see a range of outcomes. The help page states the reason plainly: a backtest “can produce profitable results that may be due to luck alone.”
  • Fills. In a backtest, NinjaTrader determines fills from 4 data points, each bar’s open, high, low and close. The Order Fill Resolution setting is Standard by default; High fills orders on a finer secondary series, such as a daily strategy filled on minute bars. Slippage is set in ticks and applies to market, stop-market and market-if-touched orders.

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.

How does Ethy test a strategy?

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.

  • Markets. Every perp on Hyperliquid’s main exchange and on trade.xyz (stocks, indices and commodities), and spot tokens. Coins Ethy can’t trade can still be backtested as research.
  • Up to 10 assets in one run, and a simulated account of a $5,000 balance with $1,000 of margin per position unless you give your own.
  • The report. Return and CAGR next to buy and hold; trades, wins and losses, win rate, profit factor, average and largest win and loss, longest losing streak and average hold; max drawdown, Sharpe, Sortino and Calmar; results per asset, long against short, by month and by market regime at entry; the equity and drawdown curves; and how often each condition passed. Every entry and exit is marked on the chart.
  • An optimizer with a held-out window. It sweeps the rule’s tunable settings (thresholds, indicator lengths, take profit and stop loss), never the position size, ranks candidates on a training window and checks each one on a held-out test window.
  • The same reading live. Indicator conditions are checked when a bar closes, on the last closed candle, the same way the backtest reads them.
Ethy backtest windows by timeframe
TimeframeHyperliquid windows (days)Spot windows (days)
5m1515
15m30, 60, 9030, 60, 90
1h30, 90, 18030, 60, 90
4h90, 180, 36530, 60, 90
1d180, 365180, 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.

How do you read a strategy tester report?

Every tester prints dozens of figures. Five carry most of the weight, and each has a catch.

The five numbers in a strategy tester report
MetricWhat it isWhat to check
Net profitThe result of all trades; TradingView shows it in currency and percentCompare it with buying and holding the same market over the same dates, not with zero
Max drawdownThe deepest fall from a peak in the equity curveAsk whether you would really have held on; MT5 shows it on the balance and on equity, which includes open trades
Profit factorGross 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 tradesClosed trades, the ones that booked a profit or lossThe fewer there are, the more one trade decides everything else
Sharpe ratioReturn above a safe rate, divided by how much returns swingDon’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.

How many trades are too few?

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:

How much a win rate can wander by chance, for a rule that truly wins 50% of the time
Closed tradesWin rate the test may show
1019% to 81%
3032% to 68%
10040% to 60%
30044% 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.

What traps make a strategy tester look better than trading?

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.

Overfitting

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.

Look-ahead

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.

Repainting

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.

Guesses inside the bar

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.

No slippage, no costs

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.

How can you start testing strategies for free?

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:

  1. Write the rule in one sentence.

    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.”

  2. Check the costs before you run.

    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.

  3. Read four numbers next to buy and hold.

    Net profit, max drawdown, profit factor and the number of trades. If the trade count is under 30, stop and add history or markets.

  4. Keep the latest stretch aside.

    Tune on the older data if you must, then run the final version once on the part you kept back.

  5. Forward test on paper.

    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.

Summary

  • A strategy tester replays fixed rules on past prices and reports every simulated trade, the equity curve and statistics such as net profit, max drawdown and profit factor.
  • TradingView tests Pine Script strategies and guesses each bar’s path from its open, high, low and close; Premium and Ultimate can use finer data, and Deep Backtesting covers all history.
  • MetaTrader 5 tests Expert Advisors with five tick models, a genetic optimizer and a forward period; NinjaTrader’s Strategy Analyzer adds walk forward optimization and Monte Carlo runs.
  • Ethy tests rules you describe in plain English on Hyperliquid perps and spot tokens, up to 365 days, and checks optimized settings on a held-out window.
  • Trade count decides how much a report means: a rule that truly wins half its trades can show anywhere from 32% to 68% over 30 trades.
  • Overfitting, look-ahead, repainting, intrabar guesses and missing costs make testers look better than trading. Set costs first and test once on data you kept aside.

Questions people ask

Is TradingView’s Strategy Tester free?

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.

How do I open the Strategy Tester in MetaTrader 5?

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.

What is a good profit factor in a backtest?

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.

How many trades does a backtest need?

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.

Why do the TradingView and MT5 testers give different results for the same idea?

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.

Can Ethy test a TradingView strategy?

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.

Sources

  1. TradingView Help Center: Strategy propertiestradingview.com
  2. TradingView Pine Script docs: Strategies (broker emulator, bar detail, commission and slippage, repainting, out-of-sample testing)tradingview.com
  3. TradingView Pine Script release notes (July 2026: Bar detalization, Order execution delay, leverage inputs)tradingview.com
  4. TradingView Help Center: How Deep Backtesting workstradingview.com
  5. TradingView Help Center: What is bar magnifier backtesting modetradingview.com
  6. TradingView Help Center: TradingView Strategy Report, how to starttradingview.com
  7. TradingView Help Center: Sharpe ratiotradingview.com
  8. TradingView Help Center: Profit factortradingview.com
  9. MetaTrader 5 Help: Testing trading strategiesmetatrader5.com
  10. MetaTrader 5 Help: Tick generation modesmetatrader5.com
  11. MetaTrader 5 Help: Optimization typesmetatrader5.com
  12. MetaTrader 5 Help: Testing reportmetatrader5.com
  13. MetaTrader 5: downloadmetatrader5.com
  14. NinjaTrader 8 Help Guide: Strategy Analyzerstatic.ninjatrader.com
  15. NinjaTrader 8 Help Guide: Walk Forward Optimizationstatic.ninjatrader.com
  16. NinjaTrader 8 Help Guide: Running a Monte Carlo Simulationstatic.ninjatrader.com
  17. NinjaTrader 8 Help Guide: Understanding historical fill processingstatic.ninjatrader.com
  18. NinjaTrader 8 Help Guide: Discrepancies, real-time vs backteststatic.ninjatrader.com
  19. NinjaTrader Developer Docs: NinjaScriptdocs.ninjatrader.com
  20. NinjaTrader: homepage (free charting, backtesting and simulation)ninjatrader.com

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.

Ethy blog

Read more

The $ETHY ecosystem

Stop watching charts.
Start living.

Deploy your AI trading agent in one click.