Entered outcomes · two-state ordering test

Trade Runs Test Calculator

Apply the NIST large-sample two-state runs statistic to an ordered W/L trade sequence, with observed runs, expected runs, variance and every run boundary visible.

Runs in your browserLarge-sample boundary enforcedNo next-trade prediction

Enter an ordered W and L sequence

Use W for win and L for loss, oldest to newest. At least 11 of each outcome are required for the disclosed NIST large-sample normal reference.

Entered

Use only W and L. Separate outcomes with spaces, commas, semicolons or new lines. Maximum 500.

Runs-test boundary: This page compares one entered binary sequence with a large-sample ordering reference. It does not prove independence, diagnose a trading system or predict the next outcome.

Entered trade runs arithmetic

Entered Strategy Diagnostics 1.0.0.

Derived
No runs statistic calculated yetEnter at least 11 W and 11 L outcomes, or load the audited example.

How the trade runs statistic is calculated

Expected runs = (2nWnL ÷ (nW + nL)) + 1
Variance = 2nWnL(2nWnL − nW − nL) ÷ ((nW + nL)²(nW + nL − 1))
Z = (Observed runs − Expected runs) ÷ √Variance

A run is one uninterrupted block of the same outcome. For example, W W L L W contains three runs. Version 1.0.0 counts the entered order exactly and applies the published NIST expected-run and variance formulas.

NIST states that the standard-normal comparison is a large-sample procedure when both state counts exceed 10. This page enforces that boundary and uses the disclosed two-sided 5% reference of plus or minus 1.96 without continuity correction.

Assumptions and limits

  • Only binary W and L outcomes are accepted; breakeven, partial and missing outcomes require a separately defined preprocessing rule.
  • At least 11 W and 11 L outcomes are required, with a maximum of 500 total outcomes.
  • Changing trade order can change runs while leaving win and loss counts unchanged.
  • Crossing or not crossing the reference is not proof of independence or a stable process.
  • No quality grade, clustering cause, next-trade probability, signal or recommendation is produced.

Worked example from the audited fixture

The audited 30-trade fixture contains 16 W outcomes and 14 L outcomes in the supplied order. That order produces 20 uninterrupted runs.

Expected runs = 15.933333; runs variance = 7.174866; runs standard deviation = 2.678594
Z = (20 − 15.933333) ÷ 2.678594 = 1.518209

How to interpret the result

The fixture’s absolute Z score is inside the disclosed two-sided 5% reference of 1.96. Expected runs and variance depend on the two outcome counts, while observed runs also depend on order. Being inside the reference is not proof of independence or a next-trade forecast.

Frequently asked questions

  • Enter an oldest-to-newest binary sequence using W for win and L for loss, with at least 11 observations of each state.
  • A run is one uninterrupted block of the same outcome, so W W L L W contains three runs.
  • Expected runs equal two times win count times loss count divided by their total, plus one.
  • Observed runs minus expected runs is divided by the square root of the published runs variance.
  • NIST describes the standard-normal reference as a large-sample procedure when both state counts exceed 10.
  • No. It follows the displayed NIST Z formula directly and states that convention.
  • No. This page describes one observed order; the probability tool models a future finite horizon under entered independent assumptions.
  • No. It does not prove independence, identify a cause, grade a strategy, forecast the next outcome or create a signal.

Sources and methodology

Compare the trading records behind your sample

Keep one broker account, return convention, fee treatment and sampling rule across the entered observations before comparing arithmetic.

XM

Review available account statements, instruments and trading terms.

Check XM terms

FBS

Compare account-history exports and cost conventions for your region.

Check FBS terms

FXOpen

Confirm account statements and trading conditions behind the entered sample.

Check FXOpen terms

Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

Disclaimer: The results from this tool are estimates for educational and informational purposes only and may differ from your broker's figures. This is not financial or investment advice. Trading forex and CFDs carries a high level of risk and can result in the loss of all your capital. Always verify calculations with your broker and trade within your risk tolerance.