Strategy Tester: read a backtest report in SuperCharting step by step
The SuperCharting Strategy Tester backtests a strategy on the chart's history and reports key stats, performance, trades analysis and a list of trades.
The Strategy Tester is the panel under the chart that shows how a strategy script would have traded the chart's history: profit and loss, drawdown, win rate, an equity curve, trade statistics and every single trade. It opens by itself the first time a strategy is added to a chart, and it updates whenever you change the symbol, the timeframe or the strategy's settings.
Backtests use past data and the costs you enter. Past results do not guarantee future results.
What the Strategy Tester tests
The tester runs scripts that use strategy(). Each order the script sends goes through a broker emulator: market orders fill on the next bar's open by default, limit and stop orders fill when the bar's range reaches their price, and commission and slippage are applied as you set them. The emulator supports strategy.entry, strategy.order, strategy.exit with profit, loss, stop, limit and trailing exits, strategy.close and strategy.close_all, pyramiding, and reversing a position with an opposite entry.
The test covers the bars loaded on the chart. A chart can hold up to 40,000 bars, so a 5-minute chart covers far less calendar time than a daily one. If you have never written a strategy, start with write your first strategy.
How to open and use the Strategy Tester in SuperCharting
- Add a strategy to the chart, from the Script Editor (Add to chart) or from the Indicators dialog.
- The tester opens under the chart. If it is closed, right-click the strategy's name in the chart legend and choose Strategy Tester.
- Use the toolbar to set the Testing period, Initial capital, Bar detalization and Script execution.
- Read the report in the chart view, then switch the view to the table for the List of trades.
- Use the collapse and maximise buttons at the right of the tab bar to shrink the panel or let it fill the chart area.
On a phone the toolbar is wider than the screen: swipe it sideways to reach every button.
The toolbar
- Testing period: Available chart range (the default), Last 7, 30, 90 or 365 days, Entire history, or a Custom date range with a start and end date. Limiting the period is how you keep part of the history aside for an out-of-sample check.
- Initial capital: the starting balance. Changing it here re-runs the test.
- Bar detalization: Default detalization (4 ticks per bar) or High detalization (about 24 ticks per bar). More detail changes how the emulator walks through each bar when a stop and a target could both be hit inside it.
- Script execution: On bar close is always on; you can add On order fill, On history bar tick and On realtime bar tick, which make the script run more often inside a bar.
- Settings (gear) opens the strategy's settings dialog. Add alert on strategy creates an alert that fires on each order fill. Optimise opens the strategy optimiser.
Properties: capital, order size and costs
The Properties tab of the strategy's settings holds the account and cost settings. Values written in the strategy() line are the starting point; anything you change here overrides them.
| Setting | What it controls |
|---|---|
| Initial capital and currency | Starting funds; currency USD, EUR, GBP, JPY, INR or Default |
| Default order size | A number of contracts, a cash amount, or % of equity per trade |
| Pyramiding | How many entries in the same direction may stack, 1 to 100 |
| Commission | Percent, cash per contract, or cash per order |
| Long leverage / Short leverage | Margin used for each side |
| Slippage | Ticks added to market and stop order prices |
| Limit order execution | Requested price, or Price improvement |
| Order execution delay | One tick (fill from the next bar) or None (fill on that bar's close) |
Most backtests that look too good have commission and slippage at zero. Set them to what your broker really charges before you read anything else.
Reading the report
Key stats
Four numbers at the top: Total PnL (with its percentage of initial capital), Max drawdown (the largest fall from a peak in equity), Profitable trades (win rate, with winners out of total) and Profit factor (gross profit divided by gross loss).
Performance
The equity chart has four lines you can switch on and off in its legend: Cumulative PnL, Buy and hold, Trades excursions and Run-ups and drawdowns. Below it, Performance analysis has five tabs:
- Breakdown: gross profit, gross loss, profit factor and commission load, with a Profits and losses chart you can split By signals (per entry name) or By side (long and short).
- Periodical: annualised return (CAGR), total return, Sharpe and Sortino ratios, and profit and loss per day, week, quarter or year.
- Benchmarking: the strategy against buy and hold, including strategy outperformance and correlation.
- Margin usage: average margin used, margin efficiency and margin calls.
- Growth and decline: average run-up and drawdown duration, and max drawdown as a share of initial capital.
Trades analysis
Three tabs: Distribution (expectancy, outliers, largest profit and loss, average profit and loss), Streaks (longest and average winning and losing streaks) and Time patterns (best day, hour and month for entries). Under them are the Returns distribution histogram and the Trades distribution donut of winners, losers and breakevens.
List of trades
The table view lists every trade by trade number, with its exit row above its entry row, the type (long or short), date and time, price, size, net profit and cumulative profit. Click a trade to show it on the chart.
An example reading
Say an EMA crossover on NSE:NIFTY 15 minutes shows Total PnL +4.2%, Profitable trades 38% (19/50), Profit factor 1.21 and Max drawdown 6.5%. A low win rate with a profit factor above 1 means the winners were larger than the losers. The drawdown is bigger than the total gain, so a trader would have sat through a loss larger than the whole result. Check the Benchmarking tab next: if buy and hold made more over the same period, the rules added risk without adding return. These numbers are an illustration of how to read the report, not a result.
Frequently asked questions
Why does the tester show "Add strategy to this chart to see report"?
The active chart has no strategy on it. Indicators do not produce a report. Add a script that uses strategy().
Why did my results change when I scrolled back in history?
Loading more history adds bars, so the test covers a longer period. Use Testing period to fix the dates you want to compare.
Does the tester trade real money?
No. It simulates orders on past bars only. To practise with simulated orders on live prices, use paper trading.
Is the Strategy Tester free?
SuperCharting is currently free to use, and the tester is part of every account. See free backtesting software for how it compares with other free options.