The System Quality Number (SQN) is Van Tharp's measure of a trading system's average result relative to the variability of its results, adjusted for trade count. Its basic formula is √N × mean(R) ÷ stdev(R), where the results are R-multiples and N is the number of closed trades. A larger positive score can come from a larger mean, lower variability or more trades. SQN describes a sample; it does not establish future profitability.

SQN belongs to the trading metrics library. It is one practitioner's system-assessment framework, associated with Van K. Tharp, rather than a universal industry grading standard.[1] Read the calculation convention before comparing scores.
System Quality Number at a glance
Scroll horizontally to read every column.
| Item | Meaning |
|---|---|
| Basic formula | √N × mean(R) ÷ stdev(R). |
| Input | One R-multiple per completed trade, including zero-result trades. |
| Numerator | Average R-multiple, also called expectancy in R, multiplied by √N. |
| Denominator | Standard deviation of those same R-multiples. |
| Convention on this page | Sample standard deviation, using N − 1; uncapped N unless explicitly stated. |
| Typical use | Comparing the mean and variability of consistently defined trade samples. |
| Main blind spot | Trade order, account exposure and dependence between trades are absent from the formula. |
What is the SQN formula?
SQN = √N × mean(R) ÷ stdev(R)
The Van Tharp Institute describes SQN as measuring "the relationship between the mean (expectancy) and the standard deviation of the R-multiple distribution", with "an adjustment for the number of trades involved". Its public page leaves the exact calculation to Tharp's book on position sizing, so this page uses the √N form common to published descriptions of the metric.[1][8]
Here, mean(R) and stdev(R) refer to the list of R-multiples, not to cash budgets. Each R-multiple is a trade's net result divided by its own initial risk. Initial R uses the original stop, even if that stop later moves. Tharp's R framework defines expectancy as the average R-multiple.[2]
- N: the number of completed trades in the selected sample.
- Mean(R): the sum of all R-multiples divided by N.
- Stdev(R): the spread of the R-multiples around their mean. This page uses the sample form below.
Sample stdev(R) = √[Σ(R-multiple − mean(R))² ÷ (N − 1)]
The risk units cancel, so SQN is dimensionless. With a positive denominator, its sign is the sign of expectancy. A negative mean produces a negative SQN. Fewer than two trades do not define a sample standard deviation, and zero standard deviation makes the ratio undefined.
Uncapped SQN has the same algebra as a one-sample t-statistic testing a zero mean: mean(R) ÷ [stdev(R) ÷ √N]. NIST gives that t-statistic form.[3] The algebra alone does not turn a selected backtest into a valid significance test. Dependence, distributional assumptions and the number of strategies tried still matter.
Worked example: calculate SQN from 25 illustrative trades
Illustrative numbers, not a recommendation or strategy results. Suppose a constructed log contains the following net R-multiples. Each completed trade has a recorded positive initial R, and the results already include the costs assumed for this example.
| Number of trades | Result per trade | Total result in R |
|---|---|---|
| 12 | −0.6R | −7.2R |
| 1 | +0.4R | +0.4R |
| 12 | +1.4R | +16.8R |
| 25 | Mean = +0.4R | +10.0R |
- Mean: (−7.2 + 0.4 + 16.8) ÷ 25 = 0.4R.
- Deviations from the mean: twelve values are −1R, one is 0R and twelve are +1R.
- Sum of squared deviations: (12 × 1) + 0 + (12 × 1) = 24.
- Sample standard deviation: √(24 ÷ 24) = 1R.
- SQN: √25 × 0.4 ÷ 1 = 2.0.
Using population standard deviation instead would divide the squared deviations by 25, producing approximately 0.980R and an SQN of 2.04. Neither number can be compared fairly with another report until both reports use the same convention.
A uniform additional cost of 0.1R on every trade would lower the mean to 0.3R without changing the standard deviation. The recalculated SQN would be 5 × 0.3 ÷ 1 = 1.5. Actual costs need not be uniform, so they can change variability too.
Why does SQN reward sample size, and what does a cap change?
Holding a positive mean and standard deviation fixed, quadrupling N doubles uncapped SQN. The score therefore mixes the shape of the trade distribution with the amount of data. It does not measure consistency independently of sample size.
Some SQN calculations cap the trade-count multiplier. A published critique of the metric reports that Tharp suggests using "N=100" when a sample has more than 100 trades.[8] To make that convention explicit, the comparison below uses a cap of 100. The mean and standard deviation still come from the full selected sample; only the multiplier is capped. A rolling sample of 100 trades would be a different calculation.
SQN with an explicitly chosen 100-trade multiplier cap = √min(N, 100) × mean(R) ÷ stdev(R)
| Illustrative sample, mean 0.4R and stdev 1R | Uncapped SQN | Multiplier capped at 100 |
|---|---|---|
| 25 trades | 2.0 | 2.0 |
| 100 trades | 4.0 | 4.0 |
| 400 trades | 8.0 | 4.0 |

A cap prevents the multiplier from growing beyond the chosen point. It does not make correlated trades independent, establish a sufficient sample or repair a biased test. Once N is capped, the resulting score is no longer the ordinary t-statistic for the full sample.
How can an SQN score be misleading or gamed?
- Counting fills as independent trades. One MT5 order can produce several deals.[5] Splitting an economic trade into several records can raise N without adding independent evidence. Define how partial entries and exits belong to one trade.
- Repeated or overlapping exposure. Several trades responding to the same market move may contain less independent information than their count suggests. The formula does not adjust N for that dependence.
- Choosing the sample after seeing the result. Removing a difficult market period or selecting only favourable symbols changes the question. TradingView's strategy documentation distinguishes optimisation data from data reserved for an out-of-sample test.[4]
- Changing the R denominator. Dividing a loss by a wider, later stop makes it appear smaller in R. Preserve initial R and disclose trades whose initial risk cannot be reconstructed.
- Ignoring sequence. Reordering the same R-multiples leaves the mean, standard deviation and SQN unchanged. The sequence can still change drawdown, especially when exposure varies.
- Rewarding low variability without examining tails. A sample that has not encountered a rare large loss can have a small denominator. The score cannot describe losses absent from the sample.
Commonly quoted SQN grading bands are interpretations within a particular framework, not universal pass marks. This page does not reproduce numerical band boundaries. A label cannot resolve missing costs, a small effective sample or repeated parameter selection. Report the underlying values and sample-size limitations alongside the score.
How do TradingView and MT5 supply the SQN inputs?
As of 25 September 2026, TradingView documents simulated trade results in its strategy report, including the Trades tab and downloadable report data.[4] Use the completed trade results and retain a separate record of initial R. A return percentage based on position value is not an R-multiple based on stop risk.
For an MT5 account, reconstruct completed trades from orders, deals and positions. MetaQuotes distinguishes all three and explains how their tickets relate.[5] A trade-count convention is especially important when an order has multiple fills or a position closes in parts.
The operational path is idea → measurable rule → TradingView alert → MT5 order. An SQN calculated from TradingView's broker emulator describes its simulated trade sample. It does not confirm the sample that a broker account actually executed.
- Record the rule condition becoming true and the TradingView alert triggering as separate events.
- Match webhook delivery to PineConnector's signal-processing record.
- Verify the EA's order request, broker acceptance, resulting deal and position separately.
- Record the initial stop and risk, then aggregate the completed trade's result before calculating its R-multiple.
PineConnector's setup test separates connection messaging, processing and confirmation of the broker trade.[6] Its loss-based sizing reference requires an explicit stop and warns that costs, fills, gaps and broker limits can change actual loss.[7] A strategy-only stop is not evidence of a broker-side stop. SQN remains a calculation from the reconciled records, not an execution instruction.
Frequently asked questions
What is SQN in trading?
SQN, or System Quality Number, combines average trade results in R, their standard deviation and the number of trades. The basic formula is √N × mean(R) ÷ stdev(R). It summarises a trade sample under a stated convention. A higher positive score can reflect more trades rather than a change in the underlying average or variability.
Who developed the System Quality Number?
The System Quality Number is associated with trading educator Van K. Tharp and his R-multiple framework. An R-multiple expresses a trade's result relative to its initial risk. SQN is a practitioner's assessment metric; its commonly quoted grading bands should not be treated as an industry-wide approval standard or a prediction of future results.
What is the SQN formula with a trade-count cap?
A capped SQN replaces N in the square-root multiplier with the smaller of the actual count and the specified cap. With an explicitly chosen cap of 100, the formula is √min(N, 100) × mean(R) ÷ stdev(R). State whether the mean and standard deviation use the full sample or a separate rolling window.
Is SQN the same as a t-statistic?
Uncapped SQN using sample standard deviation has the same formula as the one-sample t-statistic for a zero mean. That identity does not establish valid statistical significance for a backtest. Dependence between trades, distributional assumptions and selection among many tests affect the interpretation. Capping the multiplier removes the identity for samples larger than the cap.
What is a good SQN score?
There is no universal SQN score that establishes a usable trading system. The number depends on the sample, cost treatment, trade definition, standard-deviation convention and any cap on N. Examine those inputs and test on data excluded from parameter selection. An SQN score does not replace drawdown analysis or evidence that the intended trades execute.
Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.
Related reading
- Trading metrics: the complete library
- R-multiples and the initial risk denominator
- Expectancy in currency and in R
- How many trades does a backtest need?
- Maximum drawdown and what SQN leaves out
Sources
- Van Tharp Institute – Tharp Think Trading Concepts, accessed 25 September 2026.
- Van Tharp Institute – A Short Lesson on R and R-Multiples (PDF), accessed 25 September 2026.
- NIST – Confidence Limits for the Mean, accessed 25 September 2026.
- TradingView – Pine Script v6 User Manual: Strategies, accessed 25 September 2026.
- MetaQuotes – Basic Principles: Orders, Deals and Positions, accessed 25 September 2026.
- PineConnector – Test Your Setup, accessed 25 September 2026.
- PineConnector – Syntax: Loss-Based Sizing, accessed 25 September 2026.
- IndexTrader – Van Tharp's SQN, accessed 26 September 2026.
PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.