# XAUUSD Manual TradingView Replay Protocol

Purpose: manually replay XAUUSD in TradingView and journal every valid ICT/SMC setup across all strategy families. This is **not** an automated backtest engine. The goal is consistent chart-by-chart observation, execution simulation, and journaling into `data/journal.json`, `data/backtest-data.json`, and `data/shadow-trades.json`.

## 1. Replay setup

1. Open TradingView XAUUSD / GOLD chart.
2. Use Bar Replay and select the first test date/session.
3. Hide future candles before analysis.
4. Keep screenshots for each trade idea:
   - HTF narrative screenshot: W/D/H4.
   - M30 daily structure screenshot.
   - Entry timeframe screenshot: M15 or M5.
   - Exit/result screenshot.
5. Record every valid setup, including skipped, missed, observed, paper, BE, loss, and win outcomes.

## 2. Required top-down workflow for every trade

### A. HTF narrative: Weekly / Daily / H4

Before dropping below H4, define:

- Weekly bias and current dealing range.
- Daily bias, premium/discount, and displacement context.
- H4 structure: bullish/bearish delivery, consolidation, or reversal risk.
- External liquidity objectives:
  - Previous week high / low: PWH / PWL.
  - Previous day high / low: PDH / PDL.
  - Equal highs/lows, obvious swing highs/lows, session extremes.
- Internal liquidity / PD arrays:
  - FVG, IFVG, OB, breaker, BPR, rejection block, mitigation block.
- Narrative type:
  - **Internal → External:** price rebalances internal PD array, then expands toward external liquidity.
  - **External → Internal:** price raids external liquidity, then retraces into internal imbalance / PD array.

Do not mark a setup valid unless the HTF narrative names both the likely draw on liquidity and the invalidation area.

### B. Liquidity sweep checklist

Track these sweeps explicitly:

- PWL sweep.
- PWH sweep.
- PDL sweep.
- PDH sweep.
- Asia high / low sweep.
- London Judas swing.
- Equal highs / equal lows.
- Clean stop raid with displacement away from the swept level.

A wick alone is not enough. Require rejection, displacement, or a market structure shift before entry modeling.

### C. M30 daily structure

Use M30 to frame the trading day:

- Mark Asia range and session liquidity.
- Identify M30 bullish/bearish structure.
- Mark displacement legs and obvious fair value gaps.
- Confirm whether the day is delivering:
  - Internal → External, or
  - External → Internal.
- Avoid trades in mid-range chop unless a clean PD array and MSS forms.

### D. M15 / M5 execution

Use M15 first for execution context, then M5 for precision if needed:

1. Wait for sweep or HTF PD array reaction.
2. Wait for MSS / BOS with displacement.
3. Anchor Fibonacci on the displacement leg.
4. Preferred entry zone:
   - 50% retracement, or
   - 62% retracement.
5. Optional but preferred PD Array confluence:
   - FVG / IFVG.
   - Order block.
   - Breaker.
   - BPR.
   - Rejection block.
   - Mitigation block.
6. Stop goes beyond the sweep extreme, displacement origin, or invalidation candle.
7. Target opposing liquidity, HTF draw, or next PD array.

## 3. Strategy families to replay

Run the protocol across all current dashboard strategies and any added ICT/SMC variants.

### 1. Aryy HTF Narrative Fib 50/62

- HTF W/D/H4 narrative must be clear.
- Direction must align with draw on liquidity.
- Entry only after M30 confirms daily delivery.
- M15/M5 entry at Fib 50% or 62% of displacement leg.
- PD array confluence optional but grade lower without it.

### 2. ICT Sweep + MSS + FVG

- Requires PWL/PWH/PDL/PDH/session liquidity sweep.
- Requires MSS/BOS after sweep.
- Requires FVG or IFVG mitigation for entry.
- Target internal/external opposing liquidity.

### 3. Order Block Reclaim

- Identify displacement away from an OB.
- Wait for reclaim/mitigation with structure holding.
- Prefer OB inside discount for longs or premium for shorts.
- Grade higher when OB aligns with Fib 50/62 and HTF narrative.

### 4. Liquidity Sweep Reversal

- External liquidity raid must occur first.
- Reversal requires displacement away from swept level.
- Entry on retracement into FVG/BPR/OB or Fib 50/62.
- Avoid entries if sweep occurs directly into high-impact news volatility without clean structure.

### 5. Breaker Continuation

- Identify failed OB / breaker structure.
- Confirm continuation direction with displacement.
- Enter on breaker retest, ideally around 50/62 retracement.
- Target next internal/external liquidity pool.

### 6. Other ICT/SMC setups to tag when present

Use the closest dashboard strategy plus add notes/tags for:

- Balanced Price Range (BPR).
- Inverted Fair Value Gap (IFVG).
- Rejection block.
- Mitigation block.
- Judas swing.
- Turtle soup style raid.
- Market maker buy/sell model.
- Power of 3: accumulation, manipulation, distribution.
- New week opening gap / new day opening gap, if relevant.

## 4. Journal fields

Each completed replay trade should update JSON using the existing structure:

```json
{
  "id": 23,
  "date": "2026-07-16",
  "strategy": "ICT Sweep + MSS + FVG",
  "direction": "Long",
  "session": "NY AM",
  "entry": 2997.1,
  "stop": 2989.4,
  "target": 3011.0,
  "fib": "50%",
  "pd": "FVG",
  "outcome": "Win",
  "r": 1.81,
  "notes": "PDL sweep, M5 MSS, clean FVG mitigation; screenshots: ./screenshots/2026-07-16-nyam/"
}
```

Recommended extra details in `notes` until the schema is expanded:

- HTF bias.
- Internal→External or External→Internal.
- Liquidity swept.
- M30 structure read.
- Entry timeframe.
- Fib level: 50 or 62.
- PD array confluence.
- Rule grade and mistake/lesson.
- Screenshot path.

## 5. Shadow-trade protocol

Use `data/shadow-trades.json` for trades that were not official backtest executions:

- Missed valid setups.
- Observed but not entered setups.
- Paper wins/losses.
- Hesitation, early entry, late entry, or skipped due to uncertainty.

Log the R that would have resulted from the planned entry, not the emotional best-case candle.

## 6. Rule grading

Grade each setup mentally or in notes:

- **A:** HTF draw clear, liquidity sweep, M30 structure, M15/M5 MSS, Fib 50/62, PD array confluence, clean target.
- **B:** Mostly valid but missing one non-critical confluence.
- **C:** Valid idea but late/early execution or weak narrative.
- **D/F:** Forced bias, no sweep, no MSS, no displacement, or entered in chop/news noise.

Only A/B setups should influence strategy confidence. C setups are lessons. D/F setups are mistakes.

## 7. Data update flow

1. Add official replay trades to `data/journal.json`.
2. Mirror or merge official trades into `data/backtest-data.json` so the dashboard summary updates.
3. Add paper/missed/observed entries to `data/shadow-trades.json`.
4. Serve the folder locally to allow dashboard JSON loading:

```bash
cd /home/aryy/.hermes/profiles/finance/backtests/xauusd_2026
python3 -m http.server 8765
```

5. Open `http://127.0.0.1:8765/dashboard.html`.
6. Confirm the top-right data pill says `external JSON`.

## 8. Non-negotiables

- No hindsight entries after seeing target hit.
- No trade without HTF narrative.
- No entry before sweep/reaction + MSS unless explicitly tagged as a lower-quality observation.
- No changing stop/target after result is known.
- Journal losses and BE trades with the same detail as wins.
- If the setup is ambiguous, log it as shadow/observed instead of official.
