I Built a Gold Trading Bot from Scratch — Here's What Actually Works (And What Destroyed My Account First)
I didn't set out to build a trading bot. I set out to answer a simple question: can a small algorithm, running on a $100 account, consistently beat gold? After two sessions, one brutal backtest, and a complete strategy overhaul — here's exactly what we built, what failed, and what's now running live. No fluff, no paid course upsell. Just the raw journey. Gold is one of the most-traded instruments in the world. It moves on inflation data, Fed decisions, geopolitical fear, and sometimes just pure momentum. For a bot, that's both exciting and terrifying. Why gold? Trades nearly 24/5 — no gaps like individual stocks High volatility = bigger moves per signal Free price data available (no expensive data subscriptions) Retail-accessible via brokers like OANDA, FXCM, and IG Starting capital: $100. Real-world risk. No pretend money. The system has three layers: A Python script (xauusd_scalper_scrape.py) runs every hour, fetching the live XAU/USD spot price from gold-api.com (completely free, no API key). It: Appends every tick to a local price_history.jsonl file Buckets spot ticks into hourly OHLC bars (open/high/low/close) Computes EMA50 and ATR14 on the rolling bar set Evaluates the trading rules and writes the signal decision to disk This is the brain — and crucially, it's 100% deterministic. No AI decides whether to buy or sell. A Python function checks three conditions at 16:00 UTC every weekday: IF close > 3-hour NY range high AND close > EMA50 (trend filter) → BUY | Stop: 1.5×ATR below entry | Target: 5R above entry IF close 30%, pause and investigate. The market doesn't care how clever your strategy sounds. It only cares whether you're right more often than you're wrong — when it counts. The ORB strategy isn't glamorous. It doesn't use machine learning. It doesn't read news sentiment. It just watches where price consolidates in the first three hours of New York trading, waits for a decisive break in one direction, confirms the trend, and takes the trade. Simple. Systematic. Backtested. Live. We'll post updates as the live signals come in. Follow along on Telegram: @HermesGoldBot Built with: Python · Hermes Agent · OpenRouter (free tier) · gold-api.com · Telegram Bot API Strategy validated on 13,735 hourly bars, Nov 2023 – Apr 2026 Past performance does not guarantee future results. This is not financial advice.
