import json
import os

results = []

# Index 760: 2026-07-07T09:15:00Z - Short liquidity sweep reversal
results.append({
    "candidate_id": "candidate_2026-07-07T09-15-00Z_short_liquidity_sweep_reversal",
    "timestamp": "2026-07-07T09:15:00Z",
    "decision": "rejected",
    "reason": "Price sweeping local highs but H4 is heavily bullish and closing near highs. Too risky to short.",
    "htf_context": "H4 closed bullish at 4126 (01:00) then 4172 (09:00). Very strong uptrend context.",
    "m30_structure": "M15 sweeping 4131 local high but no major structure shift yet.",
    "m15_m5_execution": "M5 shows sweep of 4131 high at 09:15 but immediate strong rejection isn't confirmed. Uptrend too strong.",
    "entry": None,
    "stop": None,
    "target": None,
    "r": None,
    "promoted_to_journal": False
})

# Index 761: 2026-07-07T22:30:00Z - Long liquidity sweep reversal
results.append({
    "candidate_id": "candidate_2026-07-07T22-30-00Z_long_liquidity_sweep_reversal",
    "timestamp": "2026-07-07T22:30:00Z",
    "decision": "rejected",
    "reason": "H4 shows heavy rejection at 4180 down to 4106. Market is shifting bearish, long sweep is counter-trend.",
    "htf_context": "H4 rejected 4180 (13:00) and closed bearish at 4106 (17:00). Strong downside momentum.",
    "m30_structure": "M15 dripping lower towards 4100.",
    "m15_m5_execution": "M5 sweeping 4099 at 22:30 but against strong H4 bearish momentum. Too dangerous.",
    "entry": None,
    "stop": None,
    "target": None,
    "r": None,
    "promoted_to_journal": False
})

# Index 762: 2026-07-07T23:45:00Z - Long liquidity sweep reversal
results.append({
    "candidate_id": "candidate_2026-07-07T23-45-00Z_long_liquidity_sweep_reversal",
    "timestamp": "2026-07-07T23:45:00Z",
    "decision": "rejected",
    "reason": "Similar to 22:30, sweeping 4096 against strong H4 bearish momentum. No clear MSB.",
    "htf_context": "H4 rejected 4180 down to 4106/4111. Downward pressure remains.",
    "m30_structure": "M15 swept 4096 but trend is down.",
    "m15_m5_execution": "M5 sweeping 4096 at 23:45 but no clear M5 MSB yet to confirm reversal.",
    "entry": None,
    "stop": None,
    "target": None,
    "r": None,
    "promoted_to_journal": False
})

os.makedirs("/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/reviews/manual_replay_results", exist_ok=True)
with open("/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/reviews/manual_replay_results/replay_result_00760_00763.json", "w") as f:
    json.dump(results, f, indent=2)

with open("/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/reviews/manual_replay_progress.json", "r") as f:
    progress = json.load(f)

progress["cursor_index"] = 763

with open("/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/reviews/manual_replay_progress.json", "w") as f:
    json.dump(progress, f, indent=2)

print("Results written and cursor updated to 763.")
