TradingPactBETA
Menu
GUIDES · Evidence & ResearchFocus, Week Read & evidence

Playbook Setup Testing & Matched-Random Baselines Guide

How TradingPact's scan engine tests typed Playbook setup templates across stored 1-minute reference bars against matched random entries, weekly block bootstraps, and two non-overlapping periods.

Most retail backtests fail on live prop accounts for two predictable reasons: one flattering multi-month window mistakes underlying market drift for signal skill, and repeated rule tweaks over that same window turn luck into false confidence. TradingPact's scan engine (@repo/scan-engine) tests structured Playbook templates across stored 1-minute reference bars against matched random entries in two separate time splits.

Note that Test My Setup on Playbooks (/playbooks) is not yet open in the app (guarded behind the setupTest feature flag and CANDLE_HISTORY_ENABLED, both off by default today). When enabled, saved definitions run once against hashed stored reference history and keep results strictly separate from live trading pact (your rules) execution.

Six typed setup templates and stored 1-minute reference bars

Rather than fitting arbitrary free-text indicators, version 1 of @repo/scan-engine (SCAN_SCHEMA_VERSION = 2) evaluates 6 deterministic setup families on completed 15m (900s) or 1h (3600s) bars using session highs and lows (Prior day, Pre-London, London morning):

Template familyCore trigger geometryOutput geometry
SWEEP_RECLAIMSweep past session high/low then close back insideStop & target in ATR and R
BREAKOUT_ACCEPTANCEBreak beyond session extreme and hold acceptanceStop & target in ATR and R
FAILED_BREAKOUTReversal back through a brief breakout levelStop & target in ATR and R
COMPRESSION_BREAKContraction bar expansion out of tight rangeStop & target in ATR and R
IMPULSE_PULLBACKDirectional impulse followed by bounded pullback entryStop & target in ATR and R
ENGULFING_AT_LEVELEngulfing bar closing at a prior session extremeStop & target in ATR and R

All price math reads from @repo/candle-history (1-minute reference bars targeting a 2-year backfill depth, explicitly tracking missing data via CandleGap and CandleCoverage plus an immutable readHistoryIdentity data hash). Brackets express stops and targets strictly in ATR and R multiples so sizing remains solely with your locked pact.

Two-period splits, matched random entries, and weekly block bootstrap

To separate genuine trigger edge from a directional tailwind (such as gold trending higher for six months), every test enforces the following protocol (SETUP_TEST_DEFAULTS):

  1. Non-overlapping history split: Available candle history divides into the Older 2/3 period and the Recent 1/3 period, evaluating both independently.
  2. 10 matched random entries per signal: Every detected trade (matchedPerTrade: 10) is paired with 10 random entries at comparable session clock moments using the exact same bracket geometry, stop distance, target R, and time-exit horizon.
  3. Conservative intra-bar execution math: When a 1-minute bar hits both stop and target (ambiguousBars), the engine takes the stop loss. When a minute opens past the stop level (gappedStops), fill price records at that worse minute open rather than the requested stop.
  4. 200-trade floor & 3,000-resample bootstrap: Each period must contain at least 200 matched trades (minTradesPerPeriod: 200) and run 3,000 weekly block bootstrap resamples (resamples: 3000) to test whether the 95% confidence interval of edge over random entries (edgeR) clears 0 before declaring a pass.

Verdicts, version-count warnings, and separation from live trade records

Each saved SetupTest row (POST /api/playbooks/[id]/setup-test behind setupTest) dedupes identical definitions against identical history hashes without re-reading bars and displays one of 3 plain-English verdicts:

VerdictCondition requiredWhat sits beside it
Beat random entries in both periods95% range of edge over matched random entries stays above 0 in both Older and Recent periodsSeparate netAboveZero check after 1 assumed spread per instrument (meanCostR vs meanGrossR)
Did not beat random entries200+ matched trades per period exist, but failed the 95% threshold in at least one periodPlain-English readback of TradingPact's scan definition (Trade readback)
Too few trades to tellFewer than 200 matched trades or insufficient weeks for block bootstrap in either periodExplicit data coverage and gap summary
  • Multiple-testing disclosure: Every time you edit parameters and run a new version against the same recent history, the counter of versions checked increments visibly with a fixed warning: "Each new version checked against the same recent period makes a pass by luck more likely."
  • No blending with live execution: Your actual closed MT5 trades logged under that Playbook sit cleanly alongside the test summary (SETUP_TEST_TRADED_NOTE) and are never pooled into simulated metrics.

Compare single-window backtests with TradingPact's dual-period protocol in Curve-Fit Backtests vs Matched-Random Setup Testing, read the Matched-Random Entry Baseline glossary entry, test live closed trades in the Edge Shrinkage Calculator, or read Why backtested setups fail prop challenges.

FREQUENTLY ASKED QUESTIONS
Is Test My Setup live in the app right now?
No. Test My Setup on Playbooks is built behind the setupTest feature flag (and CANDLE_HISTORY_ENABLED for 1-minute reference bar backfill), so the testing surface is not yet open in the app.
What does a matched-random entry test catch that raw win rate misses?
It takes 10 random entries per signal using the exact same stop, target, and time-exit shape at comparable session moments. If random timing captures the same expectancy during a trending period, the trigger itself adds no structural timing edge.
How does the scan engine handle ambiguous bars and gap-through stops?
On any 1-minute exit bar touching both stop and target, the engine conservatively assigns the stop exit. If a minute opens beyond the stop price (gapped stop), the exit fills at that worse minute open rather than the idealized stop price.
Can Setup Test results count toward my Edge certification or change my lot size?
Never. Setup Test results sit strictly apart from your real closed trades planned with that Playbook and never join Edge certification, Account Governor, or Order Review sizing.
TRADINGPACT DESK · MT5

Lock your trading rules and price every order before MT5.

Join the waitlist for hosted Desk access, or look around the view-only demo on sample data, with no broker login or card required.