What is DeltaBot Goldminer?
DeltaBot Goldminer is an Expert Advisor for MetaTrader 5, designed exclusively for scalp and intraday trading of XAUUSD (Gold). It combines four trading engines — each specialising in a different market pattern — with an AI decision layer that validates every potential trade before execution.
Unlike conventional EAs that run a single indicator-based strategy, DeltaBot operates more like a small trading desk: several specialists watching the market for their specific pattern, with an AI model providing the final TRADE / SKIP call on every entry.
The EA runs on a timer (not just on every tick) and on each pass: refreshes the zone map, runs the pullback/breakout state machine, runs the trend engine, runs the sweep engine, manages every open position's break-even and trailing logic, and writes its full state to a JSON file for external monitoring. When a qualifying setup is detected, it builds a market brief — optionally with a live chart screenshot — and sends it to an AI language model for a structured TRADE or SKIP decision.
DeltaBot is not a scalper in the traditional sense. It prioritises precision over frequency — fewer trades with higher conviction, AI-confirmed entries, and strict risk controls. By default only the Pullback (PB) engine is active; Breakout, Trend, and Sweep are opt-in master switches.
How it all fits together
DeltaBot's architecture separates concerns cleanly into layers that each do one thing well.
The Zone Engine runs on every M15 / H1 / D1 bar close. It scans recent swing highs and lows, clusters nearby swing points within an ATR-based tolerance into a zone, and keeps a zone only if it has enough touches and enough age (so brand-new, untested levels aren't traded). These zones — refreshed continuously — are the foundation every engine uses.
Each strategy engine reacts to zones differently. PB and BRK share the same zone set and the same per-zone state machine: IDLE → APPROACHING → AT ZONE → REACTING → RESOLVED for pullbacks, or a separate BREAKING state for breakouts. TRD and SWP are independent of the zone state machine — TRD watches an H1 EMA stack, SWP watches the H1 EMA200 on M5.
The AI layer receives a text-based market brief — current price, zone details, spread, ATR, session — and, if a Chart-IMG API key is configured, a live chart screenshot of the bias and scan timeframes. It returns a structured JSON decision with confidence score and reasoning.
The execution layer handles order placement, hard risk-cap validation, break-even triggers, ATR trailing stops, and all trade lifecycle events — including a separate AI-review loop for pending (not-yet-filled) orders.
The four engines
Each engine specialises in a distinct market behaviour and runs independently, with its own master switch, cooldowns, and break-even/trailing settings. Positions from different engines can be open at the same time (up to the global position cap). By default only PB is enabled — BRK, TRD, and SWP are opt-in.
Pullback Engine
The PB engine is the core of DeltaBot and the only engine enabled by default. It identifies institutional support and resistance zones across three timeframes and waits for price to approach, react, and reverse at those zones — the classic "smart money bounce" entry.
How it works
The Zone Engine scans the last N candles (configurable per timeframe) on M15, H1, and D1, looking for swing highs and lows — a candle whose high/low is more extreme than a fixed number of candles on either side. Nearby swing points (within an ATR-based tolerance) are clustered into a single zone. A cluster only becomes a tradeable zone once it has enough distinct touches, spaced far enough apart in time, and is old enough that it isn't just noise from the last few candles.
When price enters the approach threshold (an ATR multiple from the zone edge, configurable per intensity preset), each zone's own state machine activates and progresses through four states:
The AI is only called the instant a zone first reaches AT ZONE — not on every tick while it's there, and not earlier in APPROACHING. This avoids burning API calls on setups that never fully develop and guarantees the AI always sees an actionable, fresh situation. After the call, the zone moves to RESOLVED and a cooldown timer starts: a longer cooldown if the AI traded it, a shorter one if it skipped, so the same zone isn't re-evaluated every few seconds.
Before the AI is even called, a stack of hard gates must pass: active trading session for this engine, global daily-loss and daily-trade caps, max open positions (per engine and per symbol), max trades on this exact zone (total and today), the economic news filter, and a minimum stagger time since the last trigger on any zone. Only once all of those pass does the EA fetch chart screenshots (if configured) and send the request to the AI.
When the AI responds, its proposed entry price is checked against the zone itself: a BUY may not sit far above the support zone's top, and a SELL may not sit far below the resistance zone's bottom, both capped by an ATR-based "chase" buffer — this stops the AI from approving a trade that's effectively chasing price that already moved away from the level that justified the setup.
Breakout Engine
Where PB fades a zone touch, BRK trades the opposite read of the same zone: a clean structural failure with momentum behind it. It is an opt-in engine (master switch off by default) that shares the same zone map as PB.
How it works
When a zone's state flips from ACTIVE to BREAKING — price has closed beyond the zone boundary — the BRK logic takes over for that zone instead of the pullback state machine, and fires the AI call at most once per break event per zone. Before that call goes out, three filters run in sequence: a body-size filter (the break candle's body must be a meaningful fraction of ATR, which weeds out a long wick that pokes through and comes straight back); a distance filter (price must not have already travelled too far beyond the zone, to avoid chasing); and, if enabled, an H1 momentum-alignment filter that compares the last few H1 closes and requires the broader trend to agree with the breakout direction.
Two entry modes are available, controlled by the InpBreakoutEntry parameter:
Enter on the break candle close. Captures full momentum but accepts whatever spread is live at that moment.
Place a pending order back at the broken zone edge, waiting for a retest. Better entry price, but risks missing the trade if price never comes back.
The AI sees the candle body size, the distance travelled since the break, and the requested entry mode, then makes the same TRADE / SKIP + confidence call as PB. Direction is fixed by the break itself — breaking up through a resistance zone is always evaluated as a BUY, breaking down through a support zone always as a SELL.
Trend EMA Engine
TRD is independent of the zone engine entirely. It identifies strong directional momentum on H1 using a three-EMA stack and enters on a pullback to the middle EMA — the "buy the dip in a trend" approach. It is opt-in and disabled by default.
How it works
TRD uses three configurable exponential moving averages (default periods 8, 21, 55) on H1 to determine bias. When all three are perfectly stacked — EMA8 above EMA21 above EMA55 for bullish, or fully reversed for bearish — a momentum regime is confirmed. A minimum-momentum filter (recent M15 price movement relative to ATR) and a minimum run of consecutive directional M15 bars both have to agree before TRD treats the regime as tradeable, and the engine optionally skips entirely if an active PB/BRK zone sits too close, leaving that setup to those engines instead.
Rather than chasing price, a dedicated pullback signal tracker watches for price dipping back to the EMA21 with a reversal candle forming on M15. If the gap to EMA8 is unusually wide — the trend is "ripping" — the engine can skip waiting for the pullback and enter at market instead. A staged pullback signal expires automatically after a configurable number of M15 bars if it never fills, so a stale signal can't fire into changed conditions.
A per-engine cooldown prevents overtrading after a TRD entry, and the engine can require AI confirmation before placing the trade (on by default) or fire directly off the technical signal. TRD has its own independent break-even and trailing settings — by default it trails with an ATR-based stop once price has moved a configured multiple of the initial risk in profit.
EMA200 Sweep Engine
SWP exploits a well-known gold pattern: a false break through the H1 EMA200, a level widely watched by retail traders, followed by a sharp reversal. It is opt-in and disabled by default, and is the only engine that can fire without an AI call at all.
How it works
The engine computes the EMA200 on H1 and watches M5 candles for a wick that pokes beyond that level — by more than a minimum ATR multiple (filtering out tiny pokes) but less than a maximum (so a genuine breakout isn't mistaken for a sweep) — and then closes back on the other side of the level. That close-back-inside is the rejection signal.
Because the sweep extreme defines a natural, tight stop-loss point, SWP setups are built around a much higher reward-to-risk target than the other engines — a small, well-placed stop with a large take-profit multiple. SWP has its own cooldown and its own independent break-even/trailing configuration, separate from PB/BRK and from TRD.
The AI brain
Every qualifying trade setup is submitted to an AI language model for validation before any order is placed (SWP can optionally skip this). The EA calls the AI provider directly over HTTP — there's no middleman server in between, just a WebRequest from MetaTrader straight to the provider's API.
What the AI receives
The request body is rebuilt fresh for every call:
The decision flow
The AI response
The AI must return a structured JSON object that DeltaBot parses deterministically — there is no free-text interpretation, every field is read by exact key:
Even after a TRADE decision arrives, the EA runs it through its own gate before placing anything: confidence must clear the threshold, the order type must be one it recognises, the stop loss must be on the correct side of entry, the proposed entry can't be chasing price too far beyond the zone, the stop-loss distance as a percentage of price must sit within a configured min/max band, and the position's actual dollar risk (at the EA's fixed lot size) must not exceed the hard per-trade risk cap — if any of these fail, the EA logs a SKIP and no order is sent, regardless of what the AI decided.
Supported AI providers
The EA also supports a custom OpenAI-compatible endpoint URL, for users who want to point it at a self-hosted or alternative model.
Real-time visibility
DeltaBot includes a CCanvas dashboard rendered directly on the MetaTrader 5 chart, alongside a draggable AI reasoning log panel. Both update on the EA's timer pass — no separate windows, no external app required to see what the bot is doing.
Main Dashboard
The main dashboard displays the full system state at a glance:
- ▸ Per-engine status (PB / BRK / TRD / SWP) — only the engines that are switched on
- ▸ Market data: spread, ATR, session window, AI provider validity
- ▸ Open positions with live floating P&L
- ▸ Today's trade count and daily loss tracking against the safety caps
AI Reasoning Log
A separate draggable panel keeps a running log of AI decisions as they happen:
Every timer pass, the EA also writes its full state — engine statuses, open positions, last AI reasoning per engine — to a JSON file in the MT5 Common\Files folder. This is what lets external monitoring tools read the bot's live state without touching MetaTrader directly.
Protecting your capital
DeltaBot treats risk management as seriously as entry logic. Every position is sized, validated, and managed through a layered risk framework designed to keep drawdowns controlled even when an engine misreads the market.
Requirements & configuration
Key input parameters
Getting started
Always run on a demo account for at least one full trading week before going live. This validates that the AI is making sensible decisions for your market conditions and configured risk parameters.
Share your results on Reddit
r/DeltaAIBotGoldminer is the central place for forward-test results, strategy discussion, and collaborative improvement. Post your weekly performance, share what's working, flag what isn't, and help shape the next version of the EA. Real data from real accounts — no cherry-picking.
Join r/DeltaAIBotGoldminer →