BG Gold

Trading,
taught to think.

A self-adapting gold trading system that learns from every trade, verifies every decision, and refuses to act when it isn't sure.

Explore the system Open dashboard
Scroll
The Idea

Most bots follow rules. This one writes new ones.

BG Gold doesn't just execute a fixed strategy. It watches its own results, adjusts its filters, and builds a model of what actually works on this instrument — in this market — right now.

◎

Adaptive thresholds

Every ten closed trades, the bot recalculates its ADX and EMA-spread gates from what actually won versus what lost. The bar for entry rises and falls with reality, not with a hardcoded number decided months ago.

◇

Machine-learned confidence

After thirty trades, a LightGBM model trains on the full record of entry features — ADX, spread, MACD histogram, regime, direction, hour of day — and starts scoring every new signal with a win-probability estimate. If the score is below threshold, the trade doesn't happen.

◈

Regime awareness

The bot classifies every moment as Trending, Choppy, or Volatile based on ADX and ATR. Each regime carries different meaning for the same signal. The system knows the difference between a breakout and a false start.

◆

Continuous adaptation

The learning never stops. Each new closed trade adds context to the model. Every twenty trades after the first thirty, the classifier retrains itself against the full history. The bot you run tomorrow is measurably smarter than the one you ran today.

Precision isn't a feature.
It's the refusal to act when the odds aren't right.
The Discipline

Every order earns its way through three independent checks.

Real trading has real failure modes. Orders get rejected. Positions get orphaned. Market data lags. BG Gold is engineered around those realities, not in denial of them.

CHECK 01

Pre-flight

Before firing, the bot re-reads positions from the broker. If anything is already open, the order is refused. If the read fails, the bot trusts its own cached state — and only proceeds when that state is flat.

CHECK 02

Direction lock

Every order is issued through a typed direction enum — LONG or SHORT — never a bare string. The enum carries its own entry side, exit side, and reconciliation logic. Direction cannot be flipped by a typo.

CHECK 03

Post-fire verify

Three seconds after firing, the bot re-reads the broker. If the fill is missing or the direction disagrees, the position is immediately closed and the bot halts. Retries up to three times with escalating delays.

CHECK 04

Live reconciliation

Every cycle, the bot compares its internal direction against the broker's. If they diverge, it trusts the broker, blocks new entries, and waits for confirmation of flat before resuming.

Risk is enforced at the exchange.

Stop-loss and take-profit orders are attached to the position at the moment of entry — held on the broker's servers, not in the bot's memory. If the bot crashes, hangs, loses its connection, or is unplugged entirely, the trade still exits at the level it was placed at. The bot can go dark. The protection cannot.

12 pts
Stop distance
5 pts
Target distance
0.01
Fixed lot size
The Resilience

Built for a world that fails.

APIs throttle. Networks drop. Services go down. A serious system doesn't hope those things away — it plans for them, redundantly.

⚡

Dual-account data

Candle data is pulled from a primary feed. When that feed throttles, the bot silently switches to a secondary account with its own rate-limit budget. Two independent sources of truth for the same market.

◐

Watchdog supervision

A system-level watchdog checks the bot's heartbeat every five minutes. If the log goes stale or the process dies, the watcher kills the hung instance and starts a fresh one — automatically, within the recovery window.

◇

Independent giveback watcher

A separate process polls open positions for peak-and-reversal patterns. If a winning trade gives back too much, the watcher closes it — regardless of what the main bot is doing. Two heads protecting the same capital.

◈

Backoff under pressure

When the broker signals rate-limit pressure, the bot backs off and waits. No retry storms. No cascading failures. The system treats throttling as information, not as an obstacle to overpower.

The system you trust with money shouldn't need to be watched.
It should be built to survive being left alone.
The Interface

Every trade, every decision, in real time.

A private dashboard tracks the whole operation. Live PnL. Position state. Adaptive thresholds as they shift. The full log of every signal the bot evaluated — and every reason it chose to act or stand down.

📊

Live account P&L

Balance, drawdown, distance to the daily loss cap, and the consistency rule all tracked in one view. The prop firm's math, computed continuously, without manual reconciliation.

📈

Edge analysis

Win rate. Profit factor. Expectancy per trade. Max drawdown. R:R ratio. Every metric that separates a real edge from a lucky streak — computed from the complete trade log the moment you open the page.

📓

Live bot logs

Signal evaluations, order fires, position confirmations, closure accounting — all streamed in real time, in Pacific time, with automatic refresh and color coding for fast scanning.

🤖

Embedded AI assistant

A Groq-powered chat assistant lives inside the dashboard. Ask it to explain any part of the code, propose a patch, or diagnose a log entry. It reads the running source and returns staged, reviewable diffs.

See it live.

The full system is running right now. Every trade it takes, every signal it skips, every update it learns from — visible in real time.

Open the dashboard