Cival Pattern Lab — Trading Playbook (a research workflow)
Most indicators ask you to trust what they draw. Pattern Lab asks the opposite: do not trust any rule, including the ones in this indicator, until it has survived costs and data it has not seen. This playbook is therefore a workflow for deciding whether a rule deserves your attention: hypothesis → holdout → decision. It does not tell you to take any trade, and none of the arrows on the chart is a recommendation.
Context first
- Pattern Lab can tell you what a precisely defined rule would have done on the bars you loaded, with the entry, stop, target and cost assumptions in
03-Reading-the-Indicator.md. It cannot tell you what the rule will do next week. - A rule's results depend on the market, the timeframe, the time of day and the volatility regime. Test the market and timeframe you actually intend to trade.
- Costs decide many rules. Fees plus slippage can be larger than the average gain a pattern offers. The default cost is 0, which is not realistic.
- Every time you change a setting and look at a result again you have run another trial. The more trials, the more likely one of them looks good by luck (selection bias).
Playbook A — Test one hypothesis from start to finish
1. Write the hypothesis before you look. One sentence: market, timeframe, rule, direction, what you expect, and why. Example (this is the rule the demo tested): "On 5-minute BTC bars, when delta flips against the previous bar's delta and the bar closes at the extreme of its range, the next bars reach twice the stop distance before the stop, after costs."
2. Fix the costs. Set Round-trip costs in price units to your realistic round-trip fees plus slippage, converted to price units: money cost per unit ÷ money value of one price unit. If you are unsure, use a pessimistic number.
3. Fix the rule. Choose Pattern, the two gates (Volume / prior mean, Minimum absolute delta %), Stop distance (ticks), Target / stop multiple and Maximum holding bars from your hypothesis. Do not tune them yet.
4. Choose the dates by the calendar, not by results. Look at the first and last bar on the chart. Keep the earliest part as train, the middle part as validation, the latest part as the untouched test. The demo used roughly two days, one and a half days and one and a quarter days. Enter Validation begins (chart time) but leave Untouched test begins empty for now: with no Test date the panel prints Test not configured, so you cannot be tempted by it.
5. Explore on train only. Untick Compact panel (title + two lines) so you can see the lines. Read the Train: line and the All line. Check that the number of trades is not tiny and that Ambiguous is small. If you change the rule, write down that you changed it (section "Journaling" below).
6. Check validation. Read the Validation: line. A rule that is positive after costs in train and negative in validation was probably fitted to train.
7. Freeze, then open the test once. When you will make no further changes, enter Untouched test begins (chart time) (it must be later than the Validation date, otherwise the panel prints INVALID: test must follow validation and stops marking signals). Read the Test: line once. If you then change the rule and look again, the test is no longer untouched; the next clean test is later data, which you have to wait for or load.
8. Decide with criteria you wrote down in step 1.
| Outcome on the panel | Decision |
|---|---|
Expectancy E is zero or negative after costs, or profit factor below 1, in validation or test |
Reject. Do not keep tuning. |
| Positive in validation and test, but the number of trades is only a handful | Not enough evidence. Extend the history or wait for newer data; do not trade it. |
| Positive after realistic costs in both validation and test, similar to train, adequate trade count, few ambiguous trades, and not carried by a couple of lucky trades (check the CSV) | Candidate worth forward testing on replay or a simulated account. It is still only a hypothesis. |
Cancel this playbook, or stand aside, when: the footprint data is incomplete for much of the history (check the complete column in PatternLab-bars.csv); you chose the dates after seeing the results; you changed the rule after seeing the Test line; the sample is too small to read; or your costs were set to zero.
A real rejection: the demo rule
The store demo ran exactly this workflow on 4.8 days of Hyperliquid BTC perpetual 5-minute bars (17–21 October 2026), with the delta-reversal rule, a 100-unit stop, a 2× target, a 24-bar limit and a 24-unit round-trip cost. Result: 78 simulated trades, profit factor 0.61, and a negative expectancy in train (−12.7), validation (−46.2) and the untouched test (−35.1). It needed about 41% winners to break even and won 32%. Decision according to the table above: reject. Nothing was lost finding this out. The correct next step is a different hypothesis, not a different stop for the same sample. The details are in section 11 of 03-Reading-the-Indicator.md.
Playbook B — Does the result survive costs?
Setup. Keep a rule and dates fixed; only change Round-trip costs in price units.
Procedure.
1. Run with your realistic cost, then with a pessimistic one (a higher number), and note All PF and the Validation: and Test: expectancy each time.
2. Work out the break-even win rate. With stop S, target multiple R and cost C (all in price units), a loss is S + C and a win is R·S − C, so the break-even win rate (ignoring time exits) is (S + C) ÷ (S × (1 + R)). In the demo S = 100, R = 2, C = 24 gives 124 ÷ 300 = 41.3%.
3. Compare to the win rate on the panel.
What the numbers mean. If the rule only has positive expectancy at zero or optimistic costs, it has nothing to trade. Costs that are a large part of the stop distance (24% in the demo) make rules much harder to pass.
Cancel when: your cost estimate is a guess you have not checked against real fills; the rule changes between runs; the win rate and the break-even rate are within the noise of a small sample.
Playbook C — A custom U/D/N candle-sequence hypothesis
Setup. Set Pattern to CandleSequence, type a sequence (U up, D down, N doji, 2 to 20 characters) and a side (Custom sequence side (+1 / -1)). The default DDDUU is an example, not a recommendation. The volume and delta gates still apply to the last bar of the sequence.
Discipline. Write down why the sequence should matter before trying it. Each additional sequence you try is another trial; with many sequences and little data, one will look good by luck. Test a handful at most, with holdouts, and expect most to fail.
Reference prices. The same as in Playbook A: entry at the next bar's open, the stop and target distances from your settings.
Cancel when: the sequence is a result of scanning many options on the same data; the number of trades is small; the sequence only works in one period.
Playbook D — Export, look closer, then replay
Setup. Set CSV export folder (blank disables) to a folder only this chart uses. After the calculation finishes, open PatternLab-trades.csv in a spreadsheet.
Questions to ask the file.
- Filter on partition: do validation and test look like train?
- How much of the net result comes from the best three trades? Remove them and re-add up net_price_units.
- Split by side, by hour of the day and by reason (Stop, Target, Stop gap, Target gap, Time). A rule that only works for one side or one hour is a narrower rule than you thought.
- Count ambiguous trades. They were scored stop-first, which is pessimistic for winners.
- In PatternLab-bars.csv, how many bars have complete equal to False? Pattern Lab silences itself on those bars.
Move to replay. If a rule has survived Playbook A and this second look, run it in ATAS market replay or on a simulated account, following exactly the assumptions the Lab used: entry at the open of the bar after the arrow, the tested stop, the tested target, the tested time limit. If you enter differently (for example with a limit order), you are trading a different rule that the Lab has not tested.
Cancel when: the replay shows costs or fills very different from your assumption; the rule behaves differently on days outside the original sample; you notice yourself bending the rule to make a trade.
If a rule survives: what a plan could look like
This is a description of how a discretionary trader might define a plan, not an instruction to trade.
- Entry. Decided at the close of the arrow bar, executed at the next bar's open, as tested.
- Stop. The tested distance from the entry; it exists before you enter.
- Management. The tested target multiple, or the time limit; nothing improvised.
- Cancel. Footprint data incomplete on the arrow bar; an event or session change that makes costs larger than assumed; you have changed any parameter since the test.
Combining with other context
Use Pattern Lab to test a rule, then ask whether the rule needs a context filter to work (for example only in certain sessions, or only near levels from another tool). Any such filter is a new hypothesis and needs its own holdout. Do not add a filter after you have seen the Test line.
Journaling and review
For every rule you test, keep a log with: date; market and timeframe; the hypothesis; every setting, including costs and holdout dates; the All, Train, Validation and Test lines and the Ambiguous / censored / pending line (take a screenshot with the panel expanded); how many trials you ran before this one; the decision and the reason. Review the log monthly. If you cannot say how many variations you tried, assume the number was larger than you think.
Mistakes to avoid
- Reading the
Allline and ignoringValidationandTest. - Leaving Compact panel (title + two lines) on and wondering where the results are.
- Leaving costs at 0.
- Looking at the Test line more than once and then adjusting.
- Treating the arrows as trade signals. An arrow means the rule matched, nothing more.
- Forgetting that the Lab takes one simulated trade at a time, while your own trading may differ.
- Loosening the gates (Volume / prior mean, Minimum absolute delta %) merely to get more signals or trades. That is a new trial, and it adds to the selection bias.
- Trusting a sample of a few dozen trades, or a single regime.
- Comparing results across settings changes without recording them.
- Taking results in price units as money: multiply by your contract size and compare against your actual costs.
Risk
Trading futures and crypto involves substantial risk of loss and is not suitable for everyone. Indicators describe what happened, not what will happen. Pattern Lab's results are a description of a past sample under simplified assumptions (entry at the next open, a fixed cost, stop-first inside a bar); real fills, slippage, funding and market conditions will differ. Test any rule on market replay or a simulated account first. Size positions so that a stop-out, or a run of them, is affordable. Past observations do not predict future results. Nothing in this product is financial advice.