# Daily TSX Swing Trade Scan — Copy and paste this prompt verbatim each morning.
# No edits needed. Claude resolves today's date automatically.

---

Run my daily TSX swing trade scan. Today's date is known from your context.

**Step 1 — Read these two files first, before any searches:**
- `/media/usb/claude/SwingTrader/screen_criteria.json`
- `/media/usb/claude/SwingTrader/positions.json`

**Step 1b — Enrich any incomplete positions in positions.json:**

For each open position missing `company`, `stop_loss_cad`, `target_1_cad`, or `target_2_cad`:
1. Search `[TICKER] TSX ATR 14 [MONTH YEAR]` to get the current 14-period ATR value.
2. Calculate (round all prices to 2 decimal places):
   - `stop_loss_cad` = `entry_price_cad` − (2.5 × ATR14)
   - `risk_cad` = `entry_price_cad` − `stop_loss_cad`
   - `target_1_cad` = `entry_price_cad` + `risk_cad`  ← 1:1
   - `target_2_cad` = `entry_price_cad` + (2 × `risk_cad`)  ← 1:2
   - `target_3_cad` = null  ← trailing stop, no fixed price
3. Set `company` from the same lookup if blank.
4. Set `target_1_hit: false` and `target_2_hit: false` if missing.
5. Write the enriched data back to `/media/usb/claude/SwingTrader/positions.json` before continuing.

Minimum valid position entry (everything else is calculated):
```json
{ "ticker": "TSX:XYZ", "entry_date": "YYYY-MM-DD", "entry_price_cad": 0.00, "shares": 0 }
```

**Step 2 — Run these 4 web searches in parallel (do not search individual tickers):**
1. TSX swing trade setups canada.swingtradebot.com today
2. TSX stocks strong buy technical rating above 200 day moving average site:barchart.com
3. TSX breakouts technical analysis site:theglobeandmail.com/investing
4. Canadian swing trade candidates TSX site:tradethatswing.com OR site:canada.swingtradebot.com

**Step 3 — For every stock the screeners return, extract only:**
ticker, price_cad, rsi_14, macd_histogram_positive, above_200d_ema, next_earnings_date, pe_ratio

Immediately discard any stock where: RSI <35 or >65, price below 200d EMA, earnings within 3 trading days, or market cap <$500M.

**Step 4 — Score each surviving candidate (keep only scores 3–5):**
+1 price above 200d EMA
+1 pullback to 20d or 50d EMA
+1 RSI between 35–55
+1 volume declining on the pullback
+1 MACD crossed or about to cross positive

**Step 5 — Check each open position in positions.json against these exit rules:**
- Stop hit → EXIT
- Earnings within 3 trading days → EXIT
- Held 3+ days with no progress toward T1 → EXIT (time stop)
- A new candidate scores ≥4 and this position scores ≤2 → flag SWAP
- Otherwise → HOLD, note whether T1 or T2 has been hit

**Step 6 — Write the output file.**
Filename: `/media/usb/claude/SwingTrader/swing_trade_YYYY-MM-DD.json` (use today's actual date).

Schema (use null for any field you cannot confirm — no prose guesses):
```json
{
  "scan_date": "",
  "macro_notes": "",
  "signals": {
    "new_buys": [
      {
        "rank": 1,
        "ticker": "",
        "company": "",
        "sector": "",
        "price_cad": null,
        "setup_type": "",
        "setup_score": null,
        "rsi_14": null,
        "macd_positive": null,
        "above_200d_ema": null,
        "pe_ratio": null,
        "next_earnings": "",
        "entry_zone_cad": "",
        "stop_cad": null,
        "t1_cad": null,
        "t2_cad": null,
        "t3_cad": null,
        "green_flags": [],
        "red_flags": []
      }
    ],
    "holds": [
      {
        "ticker": "",
        "days_held": null,
        "current_price_cad": null,
        "stop_intact": null,
        "t1_hit": null,
        "t2_hit": null,
        "action": ""
      }
    ],
    "exits": [
      {
        "ticker": "",
        "exit_reason": "",
        "action": "EXIT full position"
      }
    ],
    "watchlist": [
      {
        "ticker": "",
        "waiting_for": ""
      }
    ]
  },
  "excluded": [
    { "ticker": "", "reason": "" }
  ]
}
```

Rules:
- Do NOT re-read agent_and_tips.md — all criteria are already in screen_criteria.json.
- Step 2 screener searches come first. Then for each candidate that survives Step 3,
  run one focused follow-up search to confirm RSI, MACD, 200d EMA, and next earnings date.
  Search format: "[TICKER] TSX RSI MACD 200 day EMA earnings date [MONTH YEAR]"
- If a primary screener is inaccessible, substitute:
  "[MONTH YEAR] TSX swing trade candidates technical analysis RSI MACD" as a replacement.
- Cap: 1 per incomplete position (Step 1b) + 4 screener searches + 1 per surviving candidate (max 10 candidates = 15+ searches total).
