import json
import os

results = [
    {
        "candidate_id": "candidate_2026-04-15T03-45-00Z_short_liquidity_sweep_reversal",
        "timestamp": "2026-04-15T03:45:00Z",
        "decision": "rejected",
        "reason": "Price sweeping high of 4828.865 (from 03:30 M15 candle) and peaking at 4829.725 at 03:45. This forms a potential short sweep setup, but the M30 and H4 context shows strong bullish momentum originating from 4816 support at 03:00. Going short immediately into this bullish push is low probability.",
        "htf_context": "H4 bullish rejection from 4816.915, M30 printed a massive bullish candle at 03:00 pushing from 4816 to 4828. Strong bullish short-term momentum.",
        "m30_structure": "Bullish push from the 4816 low.",
        "m15_m5_execution": "M15 sweeps 03:30 high of 4828.865 to 4829.725 but fails to show meaningful M5 bearish breakdown immediately at 03:45. Price remains supported above 4826.",
        "entry": None,
        "stop": None,
        "target": None,
        "r": None,
        "promoted_to_journal": False
    },
    {
        "candidate_id": "candidate_2026-04-15T04-15-00Z_short_liquidity_sweep_reversal",
        "timestamp": "2026-04-15T04:15:00Z",
        "decision": "rejected",
        "reason": "Price retraced to 4820.30 at 04:00 and bounced back up, hitting 4826.715 at 04:15. This is a lower high compared to 4829.725. Attempting a short liquidity sweep here lacks a clear recent major high to sweep.",
        "htf_context": "H4 and M30 are currently in a consolidation phase following the initial bullish impulse from 4816.",
        "m30_structure": "Consolidation between 4820 and 4830.",
        "m15_m5_execution": "M15 prints an inside bar/lower high. No clear sweep of buy-side liquidity.",
        "entry": None,
        "stop": None,
        "target": None,
        "r": None,
        "promoted_to_journal": False
    },
    {
        "candidate_id": "candidate_2026-04-15T04-45-00Z_long_liquidity_sweep_reversal",
        "timestamp": "2026-04-15T04:45:00Z",
        "decision": "needs_more_context",
        "reason": "Price swept the minor low of 4821.38 (from 04:15) by dipping to 4821.53 at 04:45, but did not quite reach it. Actually the low was 4821.53 at 04:45. This looks like a higher low forming after the 4820.30 bottom at 04:00. This could be a valid long setup targeting a break of 4830, but requires TradingView M1 chronological replay to confirm if entry criteria triggered during the 04:45 M5 candle.",
        "htf_context": "H4 structure maintaining bullish posture from 4816 lows.",
        "m30_structure": "Forming a higher low base around 4820-4821 to continue the move up.",
        "m15_m5_execution": "M15 shows support at 4821. M5 shows price holding 4821.53 at 04:45 and starting to push up (closed 4825.895). Requires M1 execution evidence to validate.",
        "entry": None,
        "stop": None,
        "target": None,
        "r": None,
        "promoted_to_journal": False
    }
]

out_path = "/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/reviews/manual_replay_results/replay_result_00505_00508.json"
with open(out_path, 'w') as f:
    json.dump(results, f, indent=2)

print(f"Written results to {out_path}")

