To choose backtesting periods for bar replay, define the pre-session market states your practice sample should include before opening any selected date. A useful sample should not rely only on dates whose prior history looks familiar. The goal is sampling discipline: can you apply the same decision rule after entering from different trailing states without using the hidden session outcome to choose the date?
This guide provides a six-session selection plan for manual replay. It separates date selection from performance review. It also adds an anti-cherry-picking rule and a coverage score without pretending that a small historical exercise proves an edge. The worked numbers are synthetic teaching examples. They are not a performance claim or a prediction.
TL;DR
- Define pre-session state buckets before choosing exact dates, so a good-looking replay outcome cannot influence the sample.
- Use at least two trailing-state buckets calculated from data ending before the replay session. Add trailing-volatility labels inside each bucket.
- Keep the selected sessions even when the setup is absent or hard to classify. Those observations are part of the test.
- Score coverage and decision consistency separately from simulated profit.
- Save one unseen period for a final replay check after the rules stop changing.
Start with the question, not the date
A historical period is only useful in relation to a question. “Does this strategy work?” is too broad for a short manual exercise. A better practice question is, “Can I apply this written setup consistently across visibly different conditions?” That question can be answered with observations about rule clarity and decision quality. It cannot establish future profitability.
The distinction matters because backtesting and bar replay do different jobs. Backtesting examines how fixed rules behave across historical observations. Bar replay hides future candles so you can practice recognition and action one decision at a time. Our guide to backtesting vs paper trading vs bar replay explains when each mode is useful. This article focuses on the period-selection step that comes before a replay session.
Write the practice question at the top of the worksheet. Then freeze the setup definition for the six selected sessions. If the definition changes during the exercise, mark the change and restart on fresh periods. Otherwise, later observations are being judged with rules that earlier observations never had a chance to meet.
The U.S. Securities and Exchange Commission reminds investors that back-tested performance is hypothetical. Treat simulated profit as a description of what happened under your assumptions, not evidence of what will happen next. A small replay study can produce a clearer rule and reveal ambiguous cases. It can also show what requires more practice.
Build a six-session prior-state plan
Start with two broad prior-state buckets calculated from a fixed window that ends before each replay session. A directional prior state means that trailing window met one prewritten movement rule. A range-bound prior state means the same trailing window met a different prewritten rule. These labels organize what was knowable before replay begins. They do not describe or predict the hidden session itself.
Add a trailing-volatility label inside each bucket. “Higher” and “lower” are relative to the same instrument and timeframe. Compare a fixed recent average candle range with an earlier trailing baseline, with both windows ending before the replay session begins. Do not compare a five-minute index chart directly with a daily chart of a quiet stock. Keep the instrument, timeframe, lookback windows and data source fixed throughout the exercise.
The six-session plan uses four core prior-state cells and two reserve sessions. Pick one date from each combination of trailing direction state and trailing volatility state. The reserve sessions should come from a different calendar block and remain unseen until the setup definition survives the core sample. A selected replay may later behave differently from its prior-state label; keep it anyway.
| Session | Pre-session state target | Purpose |
|---|---|---|
| 1 | Directional trailing state, higher trailing volatility | Observe decisions after a fast, directional prior window |
| 2 | Directional trailing state, lower trailing volatility | Observe decisions after a quieter directional prior window |
| 3 | Range-bound trailing state, higher trailing volatility | Observe decisions after a wide but range-bound prior window |
| 4 | Range-bound trailing state, lower trailing volatility | Observe decisions after a quiet range-bound prior window |
| 5 | Unseen reserve | Check the frozen rule on a different calendar block |
| 6 | Unseen reserve | Repeat the check without revising the rule mid-session |
TradingView lets a user select a historical starting point in Bar Replay, while the amount of available intraday history varies by symbol and plan. Check the platform’s current Bar Replay data availability before building the schedule. If a preferred session is unavailable, replace it using the same selection rule. Do not relax the pre-session state rule just to preserve a memorable date.
This is a prior-state sampling plan, not a universal minimum sample. Six sessions can expose vague definitions and inconsistent execution. They cannot estimate a stable win rate. Our separate guide on how many trades to backtest explains why the observation count depends on the question. Setup frequency matters too, as does the variety of conditions.
Use an anti-cherry-picking rule
Period selection becomes biased when you know why a date is interesting. A famous rally can pull attention toward an obvious outcome. The same is true for a sharp selloff or a chart already used in a social post. The replay then becomes a memory test. To reduce that problem, select dates from a calendar window with a rule that does not use the strategy result.
One simple method is calendar sampling. Define an eligible month, exclude only dates with missing data or a documented platform problem, then label each candidate using a fixed window that ends before the replay session begins. Draw from those precomputed prior-state buckets without opening the selected session. The label describes the market entering the session, not what the hidden session must eventually do. Keep the selected date even when the unseen session changes character or the simulated trade loses.
A second option is event-blind sampling. Ask another person or a spreadsheet function to return dates from an eligible window without revealing headlines or the later chart. Open each date at the same preselected time. This does not remove every source of bias, but it creates a clean separation between selecting a period and liking its outcome.
Keep sessions where the setup never appears. “No valid setup” is a legitimate observation when the rule is specific. Deleting those sessions inflates setup frequency and hides the skill of waiting. Likewise, keep an ambiguous session. Mark the exact rule language that failed, finish the replay under the frozen version, then revise only after the session is complete.
The CFA Institute’s overview of backtesting and simulation treats backtesting as a historical exercise and discusses common interpretation problems. Its model-validation guidance also highlights look-ahead and related biases. For manual practice, use only information available at the decision point. Keep the selection rules written. Stop testing new variations merely because one history can be made to look impressive.
Worked example: selecting the sample before scoring it
Suppose Maya wants to practice a pullback rule on one liquid index product using 15-minute candles. Her question is whether she can apply the same written decision rule when the market enters a session from different prior states. She defines the replay window as 10:00 a.m. to noon Eastern. Every label is calculated from data ending at the previous close, before the replay session is opened.
For the directional prior-state label, Maya uses one prewritten condition applied to the preceding five sessions. For the range-bound prior-state label, she uses a different prewritten condition applied to the same five-session window. Relative volatility is measured from the preceding 20 sessions. These simplified labels organize the sample; they do not claim that the hidden replay session will remain directional, range-bound, fast or quiet.
Her calendar draw produces eight candidates from the precomputed buckets. One lacks complete data and is removed under the prewritten exclusion rule. Four fill the core cells. Two become reserve sessions. The last candidate has an unclear prior-state label and is retained as an extra diagnostic session. Maya does not relabel or replace any selected date after viewing its replay outcome.
During replay, Maya writes the setup state before revealing the next candle. “Eligible” and “not eligible” are the main labels. She uses “unclear” when neither label is defensible. She also records whether her action followed the frozen rule. After the four core sessions, she finds that the setup description is applied consistently in three sessions but becomes vague in the replay selected from the higher-volatility, range-bound prior-state cell. She records the realized replay behavior separately from its sampling label, rewrites one clause and keeps every result. The revised version is tested only on the two reserve sessions.
This exercise does not establish that the pullback rule is profitable. It shows that the initial wording became ambiguous in one replay and that a revised clause is ready for a check on unseen history. The reserve sessions keep the revision separate from the charts that inspired it.
Score prior-state coverage before performance
Use two scores. The prior-state coverage score asks whether the sample filled the four predeclared trailing-state cells. Give one point for each core cell selected under the original pre-session rule and one point for each reserve session kept unseen until the setup rule was frozen. A complete plan scores six out of six. It measures sampling coverage only, not the realized regimes inside the replay sessions.
The decision-consistency score asks whether each eligible decision followed the written rule. Divide rule-following decisions by all decisions that the rule classified as eligible. Report unclear observations separately. Do not convert an unclear case into a pass because price later moved favorably. Also do not penalize a compliant decision solely because the simulated trade lost.
Add a revision count. Each time the setup definition changes, begin a new version and use fresh history. Frequent revision is useful diagnostic information. It may mean the setup is still an idea rather than a repeatable rule. Preserve each version and move the revised rule to fresh periods instead of repeatedly tuning it on the same charts.
When the coverage plan is complete, review process errors before looking at aggregate simulated profit. Ask whether a date was swapped after its outcome became visible. Check for labels influenced by future candles. Also check whether rule changes leaked into an unfinished session. Fix those problems first. A precise performance table built on a biased selection process is still weak evidence.
Potential positives vs negatives
Potential positives
- Preselected prior-state cells reduce the temptation to choose only clean, memorable replay outcomes.
- Keeping no-setup and unclear sessions exposes weaknesses in the rule instead of hiding them.
- Reserve periods create a small separation between revising the rule and checking the revision.
Potential negatives
- Six sessions are too few to estimate a durable win rate or future return.
- Prior-state labels can still be subjective unless the trader writes observable definitions first.
- Repeated revisions consume unseen history and can turn a practice exercise into curve fitting.
What could happen from here
Clear-rule path: The setup produces similar eligibility decisions across sessions selected from the four prior-state cells. The two reserve sessions then test whether that consistency survives fresh history. A large increase in unclear labels would weaken this conclusion.
Revision path: One condition repeatedly exposes vague wording. Finish the session under the frozen version, revise one clause afterward, and test the new version only on reserve or newly selected periods. Further mid-session changes would invalidate the comparison.
Pause path: Data gaps, unavailable replay history or unstable prior-state labels prevent a clean sample. Preserve the worksheet and stop rather than replacing inconvenient dates with attractive charts. Resume only after the same selection rule can be applied.
What traders should watch next
- Whether every prior-state cell is filled without looking at the simulated result.
- How often the setup is marked unclear, and which sentence in the rule causes the ambiguity.
- Whether no-setup sessions are retained rather than deleted.
- Whether the reserve periods remain unseen until the rule is frozen.
- Whether decision consistency improves without adding more exceptions to the rule.
FAQ
How far back should I go for bar replay?
Go far enough to find unseen periods and more than one market condition, but stay within reliable data for the chosen instrument and timeframe. The holding period and setup frequency affect how much history is useful. For a manual skill drill, variety and clean execution matter more than choosing the oldest possible date.
Should I include unusual news days?
Only if the practice question includes them. If your rule excludes scheduled high-impact events, state that exclusion before sampling and keep it consistent. If the rule is meant to operate during those sessions, include a dedicated condition cell rather than allowing one unusual day to dominate the sample.
Can I change the setup during the six sessions?
You can diagnose a problem at any time, but finish the current session under the frozen wording. Write the revision afterward and test the new version on fresh periods. This preserves a clear boundary between discovering a weakness and evaluating the attempted fix.
Is six sessions enough to prove a trading strategy works?
No. Six sessions are a compact practice design for exposing ambiguity and checking decision consistency across predeclared prior-state samples. They cannot prove an edge or estimate future returns. They also cannot reproduce live execution. Larger and more rigorous testing would still face assumptions and costs. Data quality problems would remain, along with out-of-sample uncertainty.
Where ChartDojo fits
Bar Replay hides future candles and compresses chart practice. A paper account rehearses orders against a moving market. ChartDojo adds paper trading with AI grading on decision quality, so the review focuses on the reasoning behind the choice rather than treating a favorable historical outcome as proof.
Build real skills, not bad habits. Use the frozen rule and six-session worksheet to make each practice decision explicit, then use ChartDojo’s AI-powered feedback to review decision quality. Start a free trial and make the worksheet your first structured practice block.