import json

data_dir = "/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/data"

def print_bars(timeframe, start_time, end_time):
    with open(f"{data_dir}/ohlcv_{timeframe}.json", "r") as f:
        data = json.load(f)
    
    print(f"\n{timeframe} data for {start_time} to {end_time}:")
    for bar in data.get('bars', []):
        if start_time <= bar['time'] <= end_time:
            print(f"{bar['time']}: O={bar['open']} H={bar['high']} L={bar['low']} C={bar['close']}")

print_bars('M15', '2026-04-21T07:00:00Z', '2026-04-21T11:00:00Z')
print_bars('M15', '2026-04-21T11:00:00Z', '2026-04-21T14:30:00Z')
