import json

res = []

# 2026-07-01T07:15:00Z - candidate_2026-07-01T07-15-00Z_long_liquidity_sweep_reversal
# H4 closed 3974.665. The 09:00Z bar rallied to 4022, sweeping highs.
# M15: price was sweeping down to 3960.275 during 07:15 bar and quickly reversed up, breaking structure higher. 
# Fib 50/62 level from previous rally/drop is unclear without full context, but the reversal is strong.
# Wait, this is a liquidity sweep reversal. Price swept 3960 and closed M15 back inside range.
# Decision: rejected. Lacks clear M30/M15 structure alignment before the sweep, looks like a random bottom pick without more HTF context.

res.append({
  "candidate_id": "candidate_2026-07-01T07-15-00Z_long_liquidity_sweep_reversal",
  "timestamp": "2026-07-01T07:15:00Z",
  "decision": "rejected",
  "reason": "Lacks clear HTF structure alignment; sweep of 3960 is isolated without broader context.",
  "htf_context": "H4 in a chop zone around 3970-3990 before massive rally later.",
  "m30_structure": "M30 grinding down to 3960, lacking clear bullish structure.",
  "m15_m5_execution": "M15 sweeps 3960.275 and reverses, but entry criteria (Fib + PD array) are not clearly met.",
  "entry": None,
  "stop": None,
  "target": None,
  "r": None,
  "promoted_to_journal": False
})

# 2026-07-01T22:15:00Z - candidate_2026-07-01T22-15-00Z_long_liquidity_sweep_reversal
# H4 rallied massively earlier to 4115, then retraced to 4028.
# At 22:15, price is around 4038. It had a minor sweep on M5 to 4034 and bounced.
# H4 context is bullish (massive expansion), price in deep discount.
# M15 swept 4033.4 at 20:30, then chopped, then started moving up.
# Not a clear entry at 22:15.
# Decision: rejected. Retracement from 4115 is too deep and messy, no clean entry setup.

res.append({
  "candidate_id": "candidate_2026-07-01T22-15-00Z_long_liquidity_sweep_reversal",
  "timestamp": "2026-07-01T22:15:00Z",
  "decision": "rejected",
  "reason": "Messy price action following a massive H4 expansion; no clean M15/M5 entry setup at this time.",
  "htf_context": "H4 massive expansion to 4115 followed by deep retracement to 4028.",
  "m30_structure": "M30 chopping around 4030-4040, lacking clear accumulation.",
  "m15_m5_execution": "Minor M5 sweeps but no high-probability setup with Fib 50/62 alignment.",
  "entry": None,
  "stop": None,
  "target": None,
  "r": None,
  "promoted_to_journal": False
})

# 2026-07-02T01:45:00Z - candidate_2026-07-02T01-45-00Z_long_liquidity_sweep_reversal
# Same HTF context. Price starting to move up (H4 01:00Z bar opened 4052, closed 4060).
# M15 at 01:45 is retracing down to 4045.29 after a push to 4068.73.
# This could be a pullback entry, but the structure is very volatile.
# Decision: needs_more_context. The volatility is extreme, hard to pinpoint a safe setup without visual TradingView confirmation.

res.append({
  "candidate_id": "candidate_2026-07-02T01-45-00Z_long_liquidity_sweep_reversal",
  "timestamp": "2026-07-02T01:45:00Z",
  "decision": "needs_more_context",
  "reason": "High volatility environment; requires visual TradingView confirmation to validate Fibonacci levels and PD arrays.",
  "htf_context": "H4 recovering from deep retracement, moving back above 4050.",
  "m30_structure": "M30 pushing up with deep wicks.",
  "m15_m5_execution": "M15 pullback to 4045 area, but volatility makes stop placement uncertain without visual chart.",
  "entry": None,
  "stop": None,
  "target": None,
  "r": None,
  "promoted_to_journal": False
})

with open("hybrid/reviews/manual_replay_results/replay_result_00737_00740.json", "w") as f:
    json.dump(res, f, indent=2)

print("Results written.")
