Golden Oracle is an Expert Advisor for XAUUSD (Gold) built on a disciplined daily breakout strategy. At the start of each session it identifies the previous day's high and low, places a Buy Stop and Sell Stop at those structural levels, and manages the trade automatically through to expiry — including optional partial close at a midpoint Fibonacci target and automatic breakeven. No grid, no martingale, no hidden risk. One clean setup per day.
This documentation covers every aspect of the EA in detail — from first-time setup to understanding what each setting does and how it affects your trading.
📌 Features
- Daily Breakout Fibonacci Strategy — Places Buy Stop and Sell Stop orders at the previous day's high and low with TP and SL at predefined Fibonacci extension and retracement levels. Orders expire automatically at a user-defined time to prevent overnight exposure.
- Two-Stage Take Profit with Breakeven — Optionally closes 50% of the position at a midpoint Fibonacci target (TP1) and moves the Stop Loss to breakeven. The remaining half runs to the full extension target (TP2).
- Smart Risk Management — Percentage-based auto lot sizing calibrated to account equity and the exact Stop Loss distance, or a fixed lot mode. A hard margin check runs before every order.
- Built-in Live News Filter — Fetches the full week's economic calendar on startup and refreshes it hourly. Pauses trading automatically within configurable blackout windows around high-impact events. Filters by impact level and currency.
- Two-Tier Drawdown Protection — Separate daily and total drawdown limits. Daily limit resets each session. Total limit permanently halts the EA once hit. Both close open positions and remove pending orders immediately when triggered.
- No Grid or Martingale — One trade per day, one direction, fixed Stop Loss. No position stacking, no recovery logic, no hidden risk accumulation.
- Professional On-Chart Dashboard — Live panel showing previous day levels, pending order prices, real-time P&L, news countdown, drawdown status, and manual control buttons.
- Prop Firm Compatible — Daily drawdown protection, automatic order expiry, and strict one-trade-per-day logic align with most prop firm risk rules.
📌 Recommended Setup
| Parameter | Value |
|---|---|
| Symbol | XAUUSD (Gold) |
| Timeframe | H1 |
| Minimum Deposit | $500 USD |
| Recommended Deposit | $1,000 USD or more |
| Leverage | Min 1:100, Recommended 1:500 |
| Account Type | Hedging or Netting |
| Spread Type | RAW / ECN recommended |
| VPS | Strongly recommended for 24/7 operation |
📌 Step-by-Step Installation
Step 1: Open MetaTrader 5 and navigate to a XAUUSD chart on the H1 timeframe.
Step 2: After purchasing Golden Oracle EA, locate it under the Market tab in the Navigator panel. Drag and drop it onto the chart.
Step 3: In the Inputs tab, configure your preferred settings or load a set file. The key settings to review first are RiskPercent (or FixedLotSize), ExpiryHour, and UseNewsFilter.
Step 4: Enable AutoTrading in MetaTrader 5 if it is not already active.
Step 5: Press OK. The EA will initialise, apply the gold chart theme, draw Fibonacci levels on the chart, and display the dashboard panel. You are now live.
Important — News Filter Setup Required: For the built-in news filter to function, you must grant WebRequest access in MetaTrader 5. Go to Tools > Options > Expert Advisors, tick "Allow WebRequest for listed URL", and add the following URL exactly as shown:
Without this step, the EA will display "News fetch failed" in the dashboard Notes and the news filter will be inactive. The EA will continue to trade normally — it simply will not pause around news events.
📌 Understanding the News Filter
The news filter is one of the most important protective features in Golden Oracle EA. Understanding how it works will help you configure it correctly and avoid confusion about why trades are sometimes paused or removed.
How it fetches data: On each new trading day the EA makes a WebRequest to the Forex Factory economic calendar API and loads the entire week's scheduled events. This fetch is retried every hour throughout the day so that any newly published events are captured. The feed covers all major currencies and returns event times in US Eastern time with an embedded UTC offset — the EA handles the timezone conversion automatically using your broker's server time.
What "blocked" means: When a qualifying news event is approaching, the EA enters a blackout window. This window starts NewsMinsBeforeEvent minutes before the event and ends NewsMinsAfterEvent minutes after it. During this window:
- Any pending Buy Stop and Sell Stop orders already placed are automatically removed.
- No new orders will be placed.
- The news panel status bar shows BLOCKED in red.
- The Notes panel displays the event name and the time trading will resume.
- Once the window closes, pending orders are automatically re-placed — provided the daily expiry time has not yet passed.
Currency filtering: The EA only reacts to events for the currencies listed in NewsFilterCurrencies. The default is USD;EUR. For XAUUSD, USD events are the most relevant, or EUR if you notice gold reacting strongly to European releases. Separate currencies with a semicolon and use their standard three-letter codes.
Impact filtering: The calendar assigns each event a colour-coded impact level — High (red), Medium (orange), and Low (yellow). By default only High impact events trigger a blackout. Enabling Medium impact will catch events like PMI readings and consumer confidence surveys. Low impact events are rarely worth filtering unless you are highly conservative.
Important — Backtesting and the News Filter: The news filter is completely inactive in the MetaTrader 5 Strategy Tester because WebRequest is not available in that environment. This means your backtest results will NOT reflect the news filter's effect — every session will trade normally regardless of what economic events occurred historically. This is a known limitation of MetaTrader 5's testing environment and is not a bug in the EA. When evaluating backtest performance, keep in mind that live results will differ around major news events — typically positively, since the filter prevents high-volatility entries. Do not use backtest results alone to judge the EA's live behaviour during news periods.
📌 Set Files
Pre-configured set files for Golden Oracle EA are available here: Golden Oracle EA Set Files
The set files are tested on a $10,000 USD IC Markets RAW account risking 1% per trade. Select based on your risk tolerance and broker conditions. Always test any set file on a demo account or in the Strategy Tester first before deploying live.
📌 Input Parameters — Deep Dive
Each setting below includes a description of what it does, what happens when you enable or disable it, and what to watch out for.
Risk Management
- Auto Lot Size (True/False)
When True, the EA calculates lot size automatically based on your account equity and the RiskPercent setting. The exact Stop Loss distance for each trade is used so the risk is precisely calibrated — larger daily ranges produce smaller lots, tighter ranges produce larger lots.
When False, the EA uses the value in FixedLotSize for every trade regardless of account size or market conditions.
Recommendation: Use Auto Lot for long-term consistency. Use Fixed Lot if you need to control position size precisely for prop firm rules. - Risk % Per Trade
Only active when Auto Lot is enabled. A value of 1.0 means the EA will risk 1% of your account equity on each trade, based on the distance from entry to Stop Loss. Lower values reduce drawdown but also reduce profit potential. Higher values amplify both.
Watch out for: Values above 2–3% significantly increase the chance of hitting drawdown limits in losing streaks. - Fixed Lot Size
Only active when Auto Lot is disabled. The same lot size is applied to every trade. The EA will validate this against your broker's minimum and maximum volume limits at startup and will reject invalid values.
Watch out for: A fixed lot that is appropriate for a $10,000 account may be dangerously large or uselessly small on a different account size.
Trade Settings
- One Trade Per Day (True/False)
When True, the moment one of the two pending orders is triggered (either the Buy Stop or Sell Stop fills), the opposite order is automatically cancelled. This ensures you never hold positions in both directions simultaneously.
When False, both orders remain active after one triggers. If both levels are broken in the same session, you could end up with two opposite positions open at the same time.
Recommendation: Keep this enabled unless you have a specific reason to allow both directions. - Order Expiry Hour / Order Expiry Minute
Pending orders are automatically deleted at this time in server time each day. This prevents unfilled orders from carrying into the next session or overnight, where the breakout logic no longer applies.
The default of 18:00 server time suits most brokers whose gold market closes or thins out in the late US session. Adjust to match your broker's session structure.
Watch out for: Setting this too early may remove orders before the main trading session has had a chance to break the levels. Setting it too late may allow orders to fill during low-liquidity aftermarket conditions. - Trade Opposite Direction if Breakout Detected (True/False)
At session open, the EA checks whether either level has already been broken before it places orders. Normally, if a level is broken the EA skips that side entirely.
When this option is enabled, instead of skipping, the EA places the remaining order on the opposite side — effectively trading a reversion rather than a continuation.
Recommendation: Leave disabled unless you have tested and understand the implications. This setting is for advanced users.
Take Profit and Breakeven
- Enable TP1 (True/False)
When True, the EA uses a two-stage exit. TP1 is positioned at the midpoint between entry and TP2 (the full Fibonacci extension). When TP1 is reached, 50% of the position is closed and the Stop Loss is moved to breakeven.
When False, the full position runs to TP2 with no partial close. This is a higher variance approach — more profit on big moves, more full losses when the trade reverses before TP2.
Watch out for: If your lot size equals the broker's minimum volume, the EA cannot split the position in half. In this case TP1 is automatically disabled for that session and a note is displayed in the dashboard. - Move SL to Breakeven after TP1 hit (True/False)
Only relevant when TP1 is enabled. After the partial close at TP1, the Stop Loss on the remaining half is moved to the entry price plus the spread. This locks in a risk-free trade on the second half.
When False, the original Stop Loss remains even after TP1 is hit — the remaining half can still produce a full loss.
Recommendation: Keep enabled. It converts every TP1 hit into a guaranteed at-minimum breakeven outcome on the remaining position.
News Filter
- Enable News Filter (True/False)
Master switch for the entire news filter system. When disabled, the news panel is hidden and the EA trades through all economic events without pausing.
Watch out for: High-impact USD events such as NFP, CPI, and FOMC decisions routinely move gold by $10–$30 in seconds. Trading through these without protection significantly increases the risk of Stop Loss hits due to spread widening and slippage. - Filter HIGH / MEDIUM / LOW Impact (True/False)
Controls which event tiers trigger a blackout. High impact (red) covers the most market-moving releases: NFP, CPI, FOMC, GDP. Medium (orange) covers PMI, retail sales, consumer confidence. Low (yellow) covers minor data points that rarely move gold significantly.
Recommendation: At minimum, keep High Impact enabled. Enable Medium if you want extra protection at the cost of more trading pauses. - Mins to pause trading BEFORE news
How early the blackout window starts relative to the event time. The EA removes pending orders this many minutes before the release.
The default of 30 minutes is conservative and recommended. Shorter windows (e.g. 10–15 minutes) give more trading time but less protection if news drops early or market makers begin positioning aggressively ahead of the release. - Mins to resume trading AFTER news
How long after the event before the EA re-places orders. The default of 15 minutes allows initial volatility to settle.
Watch out for: Setting this too short may result in orders being placed into a still-volatile market. Setting it too long may miss the post-news trend entirely. - Close open positions during news window (True/False)
When enabled, any currently open managed positions are closed immediately when a news blackout window begins — not just the pending orders.
Recommendation: Leave disabled unless you are specifically managing prop firm daily drawdown rules. Closing a winning trade early due to news is often unnecessary and can reduce overall performance. - Currencies to filter
Semicolon-separated list of currency codes. Only events for these currencies trigger a blackout. Default is USD;EUR.
For XAUUSD trading, USD is the most critical. Adding XAU covers gold-specific announcements. Adding EUR, GBP, or JPY adds additional protection during those regions' major releases at the cost of more frequent trading pauses.
Drawdown Protection
- Enable Daily Drawdown (True/False) + Daily Drawdown %
Tracks equity loss from the start of each trading day. If equity drops by more than the specified percentage relative to the day's opening equity, the EA immediately closes all managed positions, removes pending orders, and halts trading for the rest of the day. The background of the chart turns dark orange as a visual warning.
The halt resets automatically at the start of the next trading day — trading resumes normally.
Example: With a $10,000 account and 3% daily limit, the EA halts if equity falls below $9,700 at any point during the session.
Prop firm use: Most prop firms specify a maximum daily drawdown. Set this value slightly below your firm's limit to give yourself a safety buffer. - Enable Total Drawdown (True/False) + Total Drawdown %
Tracks equity loss from the moment the EA was first attached to the chart. If the total equity loss exceeds the specified percentage, the EA permanently halts — positions are closed, orders are removed, the chart background turns dark red, and no further trading occurs regardless of what day it is.
This halt does not reset automatically. To resume trading after a total drawdown halt, remove the EA from the chart and re-attach it. This resets the equity baseline to the current account equity and trading restarts fresh.
Example: With a $10,000 account and 5% total limit, the EA permanently halts if equity ever falls below $9,500 from its starting value.
Watch out for: If you re-attach the EA after a significant loss, the new baseline resets to the current lower equity — make sure this is intentional.
EA Settings
- Magic Number
A unique integer identifier stamped on every order and position placed by the EA. The EA uses this to distinguish its own trades from manually placed trades or other EAs running on the same account.
Watch out for: If you run two instances of Golden Oracle EA on the same account (e.g. on two different charts or timeframes), they must each have a different Magic Number. If they share the same number, they will incorrectly manage each other's orders. - Trade Comment
A text label attached to every order placed by the EA. Visible in your broker's trade history and order list. Useful for filtering your history when you have other trades or EAs on the same account.
📌 Understanding the Dashboard
The on-chart dashboard is divided into sections from top to bottom:
- MARKET LEVELS — Shows the previous day's High and Low used to place today's orders. These update at the start of each new session.
- PENDING ORDERS — Shows the current Buy Stop and Sell Stop prices and lot sizes. Displays status labels such as CANCELLED, EXPIRED, DELETED, or SKIPPED when relevant. The [CANCEL] and [PLACE TRADES] buttons allow manual control.
- SETTINGS — A live summary of your current configuration: expiry time, trade mode, lot size, TP1, and breakeven status.
- PERFORMANCE — Today's P&L and total cumulative P&L for this EA instance across all history.
- DRAWDOWN PROTECTION — Live readout of current daily and total drawdown percentages versus your configured limits. Turns amber when approaching the limit, red when halted.
- NOTES — A timestamped activity log showing the most recent EA actions. Each entry shows the time it occurred and a brief description. Useful for understanding exactly what the EA did and when.
The NEWS FILTER panel sits to the right of the main dashboard. It lists upcoming economic events with their scheduled time, currency, event name, and a countdown to release. The status bar at the bottom of the news panel shows whether the EA is actively monitoring events, currently blocked, or has no further events today. The panel can be minimised using the [-] button.
📌 The [CANCEL] and [PLACE TRADES] Buttons
These two buttons give you manual control over the EA's pending orders during the session.
[CANCEL] — Deletes both pending orders from the broker. After pressing this, the EA will not automatically re-place them. This is useful if you decide you do not want to trade on a particular day after orders are already set. The button is only active (shown in red) when pending orders exist and the market is open.
[PLACE TRADES] — Re-places both pending orders based on the current previous day's high and low. This button becomes active after you have manually cancelled orders (via the button or directly in the MetaTrader order panel). Use it if you cancelled orders by mistake, or if you want to re-enter after manually closing a position. The button is blocked during news windows, after daily expiry, and during drawdown halts.
Note on manual order deletion in MT5: If you delete the EA's pending orders directly from the MetaTrader 5 order panel (rather than using the [CANCEL] button), the EA detects this automatically and enables the [PLACE TRADES] button — allowing you to re-place them without restarting the EA.
📌 Discounted Commissions
Golden Oracle EA performs best on a RAW or ECN account with tight spreads and low commissions. I recommend IC Markets — it offers some of the tightest spreads on XAUUSD with reliable execution and deep liquidity.
Open an IC Markets account with discounted commissions: https://icmarkets.com/?camp=86332
Using a RAW/ECN account reduces trading costs, which directly improves the EA's net performance over time.
📌 Backtesting Guidelines
Golden Oracle EA supports backtesting in the MetaTrader 5 Strategy Tester with the following important notes:
- News filter is disabled in backtest: WebRequest is not available in the Strategy Tester. The EA will detect this automatically and skip all news-related functions. Your backtest will trade through every news event without pausing. This means backtests will show trades that would have been blocked in live trading — backtest results will not match live performance around high-impact events.
- Spread matters significantly: XAUUSD spread can widen dramatically during news events and low-liquidity periods. For realistic backtesting, use a fixed spread of 15–20 points. Using a lower fixed spread will overstate performance.
- Use real tick data for the most accurate results: In the Strategy Tester, select "Every Tick Based on Real Ticks" if your broker provides historical tick data for XAUUSD. If not, "Every Tick" with OHLC modelling is the next best option.
- Drawdown protection works in backtest: Both daily and total drawdown limits function normally in the Strategy Tester and will halt the EA if triggered.
- TP1 partial close works in backtest: The two-stage take profit and breakeven system are fully functional in the Strategy Tester.
📌 Frequently Asked Questions
- "Can I use this on a prop firm?"
Yes. The daily drawdown protection, total drawdown protection, automatic order expiry, and one-trade-per-day logic align with most prop firm risk rules. Set the daily drawdown limit slightly below your firm's maximum (e.g. if your firm allows 5% daily, set the EA to 4%). Always review your specific firm's rules before trading with any EA. - "The news panel says 'NO RED EVENTS TODAY' but I know there are events. Why?"
This can happen for a few reasons: the events may be for currencies not in your NewsFilterCurrencies list, they may be classified as Medium or Low impact (which are off by default), or they may have already passed for the day. Check that the currency and impact filters match the events you are expecting. Also confirm that WebRequest is enabled and the URL is added correctly. - "My orders are being removed before the news event. Is this normal?"
Yes. The blackout window starts NewsMinsBeforeEvent minutes before the event (default 30 minutes). If your orders were removed 30 minutes before the scheduled release time, this is expected behaviour. - "The EA skipped today's trade. Why?"
The EA checks whether price has already traded through either the previous day's high or low before placing orders. If one or both levels are already broken when the EA's delay period expires, it skips that side (or the entire day) to avoid chasing a breakout that has already happened. The Notes panel will display which level was broken and why the trade was skipped. - "My lot size is being reduced. Why?"
A hard margin check runs before every order. If your account cannot support the calculated lot size based on available free margin, the EA reduces it to the largest size that fits. This is by design to prevent rejected orders. You will see a note in the dashboard when this occurs. To resolve it, reduce your RiskPercent or increase your account balance. - "Can I run this on other symbols?"
The strategy is designed and tested designed on XAUUSD. - "The EA was permanently halted by total drawdown. How do I restart it?"
Remove the EA from the chart entirely, then drag and drop it back on. This reattaches it fresh, resets the total equity baseline to your current equity, and resumes normal operation. Before doing this, make sure you understand why the halt was triggered and whether it is appropriate to continue trading. - "What happens if MetaTrader 5 restarts while orders are open?"
The EA scans all open pending orders on initialisation and recovers its state automatically. It will detect existing orders by Magic Number, restore the dashboard display, and continue managing them as normal. No duplicate orders will be placed.
📌 Final Notes
- A VPS running 24/7 is strongly recommended to ensure the news filter, hourly calendar refresh, and order management functions run without interruption.
- Always test on a demo account or in the Strategy Tester for at least 1–2 weeks before moving to a live account.
- The EA applies a gold-themed dark chart appearance on attach. This is intentional and can be changed through MetaTrader 5's chart settings after the EA is removed if preferred.
- If you are unsure how to set up the EA, configure the news filter, or set up a VPS, please send a private message on MQL5 and I will be happy to assist.
- Live Signal: Coming Soon. Follow the product page for updates.
Risk Warning: Past performance does not guarantee future results. Trading financial markets involves a high level of risk and is not suitable for all investors. Only trade with capital you can afford to lose. Always test thoroughly on a demo account before deploying on a live account.
Written by: Keyan Goh (Developer of Golden Oracle EA & Golden Tiger EA)


