# LPH4 Phase 1B non-vacuous execution parity

## Verdict

**Branch A: `FULL_PARITY_PASS`.**

The final comparison pair used MT5 build 6090 for both binaries. Across identical XAUUSDzero real ticks, the canonical EA and research Branch A produced exactly the same completed-bar decisions, signals, pending orders, fills, expirations, stop changes, exits, order comments, order/deal numbering, prices, lots, and final balance.

The earlier Phase 1 result is relabeled `PARITY_PASS_DECISIONS_ONLY`.

A0 was not run. Branches B–G were not implemented or run.

## Controlled change

The only strategy input changed from Phase 1 was:

- `InpMaxSpreadPips=1000.0`

Both runs retained:

- `InpUseHardSpreadCeiling=false`
- `InpUseRolloverEntryBlock=false`

The 1000-pip setting was used solely to exercise execution paths. These results are not evidence of strategy performance.

## Final matched environment

- Symbol/timeframe: XAUUSDzero H4
- Requested period: 2025-01-01 through 2025-12-31
- Tester interval: 2025-01-01 00:00 through 2025-12-31 00:00
- Model: every tick based on real ticks (`Model=4`)
- Ticks per run: 55,074,727
- Bars per run: 1,541
- Deposit: USD 10,000
- Leverage: 1:500
- Fixed lot: 0.10
- Risk-percent sizing: off
- Required base: XAUUSD
- Magic: 41520301
- D1 EMA50: enabled
- Notifications: disabled
- Tester build for final pair: MT5 build 6090
- Same portable terminal, account specification, history, tick files, and local tester agent

MT5 auto-updated the isolated terminal after the first canonical attempt. That initial build-5833 canonical run was superseded. Canonical was rerun after the update, and only the build-6090 canonical and build-6090 research runs form this verdict.

## Exact sequence comparison

| Evidence | Canonical | Research A | Result |
|---|---:|---:|---|
| All normalized simulated events | 2,130 | 2,130 | Exact |
| Completed-H4 decision rows | 1,541 | 1,541 | Exact |
| Trade/order-management event rows | 436 | 436 | Exact |
| Valid placed signals | 32 | 32 | Exact |
| Pending orders | 64 | 64 | Exact |
| Filled pending orders | 62 | 62 | Exact |
| Expired pending orders | 2 | 2 | Exact |
| Actual deals | 124 | 124 | Exact |
| TP1/TP2 breakeven modifications | 20 | 20 | Exact |
| Stop-loss-triggered exits | 29 | 29 | Exact |
| Take-profit-triggered exits | 33 | 33 | Exact |
| Final balance | $11,818.90 | $11,818.90 | Exact |
| Net profit | $1,818.90 | $1,818.90 | Exact |

All 64 pending orders used 0.05 lots: the fixed 0.10 total was divided identically into 0.05 TP1 and 0.05 TP2 legs.

## Exit attribution

| Leg and exit | Count in each run |
|---|---:|
| TP1 take profit | 20 |
| TP1 stop loss | 11 |
| TP2 take profit | 13 |
| TP2 stop loss | 18 |
| Total exits | 62 |

Of the 29 stop-loss triggers, 7 occurred at the position's breakeven stop level and 22 at a non-breakeven stop level. There were 20 TP2 moves to breakeven; some later reached TP2 and others remained open until another exit path.

## CSV comparison

After excluding only deliberately different identity metadata (`EAName`, `Profile`, and the research branch label in `Strategy`):

- `alpha_signals.csv`: 49 versus 49 rows, exact
- `alpha_orders.csv`: 84 versus 84 rows, exact
- `alpha_errors.csv`: 6 versus 6 rows, exact

All functional fields remained in the comparison, including timestamps, direction, entry, SL, TP, lots, ticket, order type, status, reason/comment, and profit fields. Order comments were identical and retained the canonical `LPH_TEST1_..._P1/P2` format.

## Drawdown comparison

Drawdown behavior is identical because both runs used the same tick stream and had an exact match in every position-changing event, price, volume, stop, and exit. The headless terminal did not emit the configured HTML reports, so a numeric tester drawdown value is not claimed here. The native `.tst` result caches for both runs are preserved under `reports/`.

This report does not interpret profit, drawdown, win rate, or any other metric as strategy evidence; the spread gate was intentionally neutralized.

## Report and evidence limitation

The terminal completed both tests successfully but again did not write the configured HTML paths. Preserved replacements are:

- Native MT5 canonical `.tst` result cache
- Native MT5 research `.tst` result cache
- Complete local-agent and tester logs
- Normalized all-event ledgers
- Normalized trade-event ledgers
- EA signal/order/error CSVs
- Exact input sets and tester configurations
- SHA-256 manifest
- Reproducible comparison script and comparison CSVs

## Evidence map

- `comparison_evidence/comparison_summary.csv`: main parity result
- `comparison_evidence/ea_csv_comparison.csv`: functional CSV equality
- `comparison_evidence/canonical_all_simulated_events.log`
- `comparison_evidence/research_all_simulated_events.log`
- `comparison_evidence/canonical_trade_events.log`
- `comparison_evidence/research_trade_events.log`
- `comparison_evidence/sha256_manifest.csv`
- `reports/01_CANONICAL_V15_SPREAD_NEUTRAL.tst`
- `reports/02_RESEARCH_A_SPREAD_NEUTRAL.tst`
- `terminal_logs/canonical/agent_20260802_final_full.log`
- `terminal_logs/research_control/agent_20260802_full.log`
- `ea_logs/canonical/`
- `ea_logs/research_control/`
- `configs/`
- `sets/`
- `compare_phase1b.ps1`

## Required stop

Work stops here. No A0 or later research branch was run.
