# Cival Pattern Lab — Step-by-step tutorial

Release 1.0.0-atas.

## 1. Install and load

Close ATAS, run .\ATAS\Install.ps1, start ATAS and add Cival Pattern Lab to a chart that has footprint history. When the calculation finishes the panel title reads Cival Pattern Lab — simulation and arrows appear on bars where the rule matched.

## 2. Show the results

Untick Compact panel (title + two lines) in the Information panel group. The panel now shows all nine lines, including All n=… PF=… DD=… and the Ambiguous / censored / pending line.

## 3. Set costs and the rule

Enter Round-trip costs in price units, then Stop distance (ticks), Target / stop multiple and Maximum holding bars, and choose Pattern. The All line updates after the recalculation; n changes with the rule, PF and E change with costs.

## 4. Hold out data

Enter Validation begins (chart time) for the last third of your history and leave the Test date empty. The Train and Validation lines appear and the Test line reads Test not configured.

## 5. Read the evidence

Compare the win rate with the break-even rate (S + C) ÷ (S × (1 + R)), where S is the stop, R the target multiple and C the cost, all in price units. A rule needs positive expectancy after costs in validation as well as train. Check Ambiguous, censored and pending.

## 6. Freeze and test once

When no further changes will be made, enter Untouched test begins (chart time) later than the Validation date and read the Test line once. If the Test line is negative or the sample is tiny, reject the rule or gather more data instead of tuning.

## 7. Export for a second look

Set CSV export folder to a folder used only by this chart. PatternLab-trades.csv and PatternLab-bars.csv appear after the calculation; check the partition, reason and ambiguous columns and the share of the result that comes from the best three trades.
