This guide explains how to install, configure, test, and operate AI Gold Ultimate in MetaTrader 5. All setting names below are written exactly as they appear in the Inputs tab of the EA, so you can follow the guide line by line.
AI Gold Ultimate is an Expert Advisor for Gold (XAUUSD). It combines 12 independent trading setups: setups 01 to 08 are short-term setups, and setups 09 to 12 are swing setups that can hold positions for several days. An adaptive AI engine decides how much each short-term order should contribute in the current market condition. Every order is sent with its own stop loss and take profit. The EA does not use martingale, grid, or hedging recovery.
This guide does not disclose proprietary entry conditions, indicators, analysis timeframes, signal rules, or the internal logic of the AI engine.
Risk warning: Trading Gold involves substantial risk. Backtest results and past performance do not guarantee future results. Test the EA on a Demo account first, begin with a low-risk configuration, and trade only with capital you can afford to lose.
1. Installing the Product from MQL5 Market
- Open the MetaTrader 5 terminal where you want to use the product.
- Sign in with the same MQL5 account used to purchase AI Gold Ultimate. You can check this under Tools > Options > Community.
- Open the Navigator window (View > Navigator or Ctrl+N).
- Open Market > My Purchases, find AI Gold Ultimate, and click Install.
- In Navigator, open Expert Advisors > Market.
- Open one XAUUSD chart (your broker may call it GOLD, XAUUSD.m, XAUUSDm, and so on) and drag AI Gold Ultimate onto it.
- In the Common tab, enable Allow Algo Trading.
- Enable the main Algo Trading button in the MetaTrader 5 toolbar.
- Check that the dashboard appears on the chart and that the Experts tab shows the line AI Gold Ultimate v1.05 started on ... .
Important: Do not copy a Market product manually from one terminal or computer to another. Install it through My Purchases with the MQL5 account that owns the product.
2. System and Account Requirements
- Platform: an updated MetaTrader 5 terminal with a stable connection. A VPS is recommended for continuous operation.
- Symbol: XAUUSD / GOLD, using your broker's symbol name. Both 2-digit and 3-digit Gold quotes are supported. On other symbols the EA shows NOT GOLD | UNVALIDATED and the AI engine is not used.
- Chart timeframe: any. The EA uses its own internal timeframes, so changing the chart period does not change trading.
- Account type: a Hedging account is recommended. On a Netting account the EA keeps only one position at a time, which changes results.
- Broker server time: the EA was developed and tested on the most common MT5 server time, which follows the New York close (GMT+2 in winter, GMT+3 in summer). The EA's internal market structure and trading schedule depend on the broker's server time. On brokers that use a different server time, for example GMT+0, the trading day is divided differently and results can differ significantly. Check your broker's server time before trading live.
- Balance: with Risk % of equity sizing, a balance of 5,000 USD or more lets the EA size every setup close to the selected risk. On smaller accounts the broker's minimum lot can be larger than the selected risk on wider-stop trades; Lot per balance step is the better choice there. No starting balance guarantees account safety.
- Execution: Gold moves fast. A broker with low spreads and fast, clean execution is strongly recommended. Section 8 explains how the EA measures execution quality on your account.
3. First Start
- Attach the EA to one XAUUSD chart with the default inputs. The default inputs are the main tested configuration.
- Check the dashboard status line. AI ENGINE ACTIVE means the EA is working normally.
- Do not expect an order immediately. The EA prepares orders on its own schedule. The dashboard row Next update shows the countdown to the next scheduled review.
- Most orders are placed as waiting (pending stop) orders. They appear in the Trade tab and become positions only if price reaches them. Waiting orders that are no longer needed are removed or replaced automatically.
- When the EA starts on a new chart, the AI engine may need a short time to load market history. Until it is ready, the journal shows Market data is still loading. Default sizing is used until it is ready.
4. Recommended Settings for New Users
- Start on a Demo account or with the minimum risk you are comfortable with.
- Keep Engine mode = Adaptive (AI selects setups), Trading style = Short-term + Swing, and AI selectivity = Balanced.
- Keep the default setup switches. Trading setup 10 and Trading setup 12 are off in the default configuration; enabling them adds more orders and more exposure.
- For a balance below 5,000 USD, use Lot mode = Lot per balance step.
- Keep both options in 07 | EXECUTION off at first. After about 20 filled orders, check the Execution (avg slip) row on the dashboard (section 8) and decide whether you need them.
- Run only one copy of the EA per account and symbol, unless you give each copy a different Magic number (base) .
5. General Rules When Changing Inputs
- Change inputs only when you understand the effect. More setups, a higher risk, or higher limits all increase total exposure.
- Changing inputs restarts the EA on the chart. Open positions and waiting orders stay in place and continue to be managed, as long as Magic number (base) is not changed.
- Do not change Magic number (base) while the EA still has open positions or waiting orders. With a new magic number the EA no longer recognises the old trades.
- If an input value is not allowed, the EA does not start and the Experts tab shows AI Gold Ultimate | Invalid input: ... with the reason (see section 11).
6. Complete Input Reference
6.1. 01 | MONEY MANAGEMENT
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Lot mode | Risk % of equity | Selects how the base lot of each order is calculated: Fixed lot, Lot per balance step, or Risk % of equity. |
| Fixed lot | 0.01 | Base lot per order when Lot mode = Fixed lot. |
| Step: balance per step | 1000 | Used when Lot mode = Lot per balance step. Base lot = (balance divided by this value, rounded down) × Step: lot added per step . Example: balance 2,500 with 1000 and 0.01 gives a base lot of 0.02. |
| Step: lot added per step | 0.01 | Lot added for every full balance step. |
| Risk: % of equity per trade | 0.5 | Used when Lot mode = Risk % of equity. The base lot is sized so that the order's stop loss costs this percentage of current equity. Allowed range: above 0 and up to 10. |
| Risk: allow broker min lot | true | Risk mode only. If the calculated lot is smaller than the broker's minimum lot: true = trade the minimum lot (the real risk of that order is then higher than the setting); false = skip the order and write Order skipped: minimum lot ... is above the ...% risk setting. in the journal. |
| Max lot per trade (0 = broker) | 0 | Upper limit for the lot of any single order. 0 uses the broker's maximum lot. |
How the final lot is calculated. The base lot from the selected Lot mode is multiplied by the AI engine's weight for that order (see 6.2), and by the Execution Guard factor if that option is on (see 8.2). The result is rounded down to the broker's lot step. If it falls below the broker's minimum lot, the minimum lot is used, except in Risk mode with Risk: allow broker min lot = false, where the order is skipped. The lot is then limited by Max lot per trade (0 = broker) , by the broker's volume limit, by free margin, and by Max margin use, % equity (0 = off) .
Because of the AI weight, the real lot of an order in Adaptive mode can be smaller or larger than the base lot, in every lot mode. With Risk % of equity and Balanced selectivity, the risk of a single short-term order can reach about 1.5 times the configured percentage. If you need every order to use exactly the base lot, set Engine mode = All enabled setups.
6.2. 02 | AI ENGINE
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Engine mode | Adaptive (AI selects setups) | Adaptive (AI selects setups): the AI engine evaluates the market condition for every short-term order and adjusts its size. All enabled setups: the AI engine is switched off and every enabled setup trades at the base lot. |
| Trading style | Short-term + Swing | Short-term + Swing: setups 01 to 12 (the full system). Short-term only: only setups 01 to 08. Swing only: only setups 09 to 12. The setup switches in section 03 still apply inside the selected style. |
| AI selectivity | Balanced | How strongly the AI engine influences position size in Adaptive mode (see the table below). |
AI selectivity choices (Adaptive mode)
| Choice | Short-term orders (01-08) | Swing orders (09-12) |
|---|---|---|
| Relaxed (more trades) | Light AI influence: about 0.75× to 1.25× the base lot. | 0.75× the base lot. |
| Balanced (default, main tested configuration) | About 0.5× to 1.5× the base lot: more size in favourable conditions, less in unfavourable ones. | 0.5× the base lot. |
| Strict (fewer trades) | The weakest opportunities are skipped; the rest trade at about 0.75× to 1.5× the base lot. | 0.5× the base lot. |
In All enabled setups mode, every order uses 1.0× the base lot.
6.3. 03 | TRADING SETUPS
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Trading setup 01 ... Trading setup 08 | true | Turns each short-term setup on or off. Short-term trades usually last from minutes to hours. |
| Trading setup 09 , Trading setup 11 | true | Turns each swing setup on or off. Swing trades can stay open for several days and carry overnight swap. |
| Trading setup 10 , Trading setup 12 | false | Optional swing setups, off in the default configuration. Enabling them adds orders and exposure. |
Each setup works independently with its own orders, stop loss, and take profit. Different setups can hold positions in different directions at the same time; this is diversification, not hedging recovery. At least one setup must be enabled within the selected Trading style , otherwise the EA does not start.
Turning a setup off stops new orders for that setup. Its open positions continue to be managed until they close.
6.4. 04 | TRADE MANAGEMENT
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Max open trades | 12 | Maximum number of open positions of this EA on the chart symbol. When the limit is reached, new orders are paused (range 1-50). |
| Max waiting orders | 24 | Maximum number of waiting (pending) orders of this EA. When the limit is reached, no more waiting orders are placed (range 1-100). |
| Max margin use, % equity (0 = off) | 60 | Caps the total margin of the EA's open positions and waiting orders, including the new order, as a percentage of equity. If a new order does not fit, its lot is reduced, or the order is skipped if even the minimum lot does not fit. 0 turns this cap off (the EA still never uses more than 90% of free margin for one order). |
| Close trades before weekend | false | true closes all open positions of the EA on Friday, about 25 minutes before the EA's Friday cut-off (see section 9). false keeps positions open over the weekend with their stop loss and take profit. |
6.5. 05 | MARKET FILTERS
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Max spread, price (0 = off) | 0.60 | New orders are paused while the spread is above this value. The value is in price, not points: 0.60 means 60 cents of Gold price, which is the same on 2-digit and 3-digit quotes. 0 turns the filter off. Open positions are not affected. |
| News filter | Off | Off: no news pause. Major USD events: pauses new orders around the main US releases (Non-Farm Payrolls, CPI, PPI, PCE, and FOMC / Fed rate decisions). All high-impact USD events: pauses around every high-impact USD event in the MetaTrader 5 economic calendar. |
| News: pause before (min) | 30 | Minutes before a selected event when the pause starts. |
| News: pause after (min) | 30 | Minutes after a selected event when the pause ends. |
During a news pause no new orders are placed and short-term waiting orders are not renewed. Open positions keep their stop loss and take profit. The news filter uses the MetaTrader 5 economic calendar, so it works on live and demo charts but not in the Strategy Tester. If calendar data cannot be loaded, the EA writes News data unavailable ... Trading continues without the news pause. and continues trading.
6.6. 06 | DISPLAY & LOG
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Show info panel | true | Shows or hides the dashboard on the chart. Trading is the same either way. |
| Journal detail | Normal | Minimal (errors only), Normal (errors plus important events such as orders, closes, pauses, and daily summaries), or Detailed (everything, useful when asking for support). |
6.7. 07 | EXECUTION
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Execution guard (auto) | false | true lets the EA automatically reduce or pause the short-term setups that are most sensitive to slippage when the measured fills on your account become consistently worse, and restore them when fills improve. Swing setups are never affected. Details in section 8.2. |
| Order price variation | false | true shifts the entry price of short-term orders by a small amount (at most 0.30 of Gold price) that is fixed for your trading account, so your orders are not placed at exactly the same prices as other users of the EA. Details in section 8.3. |
With both options off (the default), the EA trades exactly as in the main tested configuration. The execution measurement on the dashboard always runs and never changes trading by itself.
6.8. 90 | IDENTIFICATION
| Setting shown in Inputs | Default | What it does |
|---|---|---|
| Magic number (base) | 2611300 | Identifies the trades of this EA. Each setup uses its own number: base + 1 for setup 01 up to base + 12 for setup 12. If you run a second copy of the EA on the same account, give it a base that differs by at least 100. Do not change it while trades are open. |
| Order comment | AI Gold Ultimate | Comment attached to every order, visible in the Trade and History tabs. Your broker may shorten or replace it. |
| Max slippage (points) | 50 | Maximum price deviation accepted when the EA closes a position at market. The value is in points, so it depends on the number of digits: on a 2-digit Gold quote 50 points = 0.50 of price; on a 3-digit quote 50 points = 0.050. To keep the same tolerance on a 3-digit quote, use 500. |
6.9. 99 | PRODUCT INFO
Warning , Author , MQL5 profile , and Support are information only. They do not control trading. AI Gold Ultimate is sold only on MQL5 Market; copies from other sources are not genuine.
7. Reading the Chart Dashboard
Status line (under the title)
| Status | Meaning |
|---|---|
| AI ENGINE ACTIVE | Everything is normal; the EA may place new orders. |
| MARKET CLOSED | Weekend, or no price updates from the broker for a while. |
| TRADING DISABLED | Algo trading is not allowed: check the Algo Trading button, the Allow Algo Trading option of the EA, and the account permissions. |
| WEEKEND PROTECTION | Friday after the cut-off: short-term waiting orders are removed and no new orders are placed until the next week. |
| PAUSED | NEWS | A selected news event is inside the pause window. |
| PAUSED | HIGH SPREAD | The spread is above Max spread, price (0 = off) . |
| NOT GOLD | UNVALIDATED | The chart symbol is not Gold. The EA is designed and tested for XAUUSD only. |
AI ADAPTIVE ENGINE
- Engine: Scanning while the market is open and trading is allowed, Standby otherwise.
- Market mode: how the AI engine currently reads Gold: MOMENTUM FOCUS (favourable conditions, larger short-term weights), BALANCED , or DEFENSIVE (unfavourable conditions, smaller weights). ALL SETUPS is shown when Engine mode = All enabled setups; SWING FOCUS when only swing setups are active.
- AI confidence: the average score the engine gave to the short-term setups at the last update, from 0% to 100%. Higher means more favourable conditions.
- Trading style: the selected style.
- Setups enabled / active: number of enabled setups / number of setups that currently have a position or a waiting order.
- Next update: countdown to the next scheduled review of the setups.
MARKET CONDITIONS
- Market activity: how actively Gold has been moving recently (average hourly range in USD): LOW , NORMAL , HIGH , or VERY HIGH .
- Spread: current spread, with OK or HIGH compared with your limit.
- News guard: Off , Clear | next 2h 15m (time to the next selected event), PAUSED , Data unavailable , or Live only (in the Strategy Tester).
- Execution (avg slip): execution quality measured on your account (section 8).
PERFORMANCE
- Open trades and Waiting orders: current count / your limit.
- Floating P/L: unrealised result of the EA's open positions, including swap.
- Profit today, Closed (this EA) (number of closed trades and win rate), and Net result: realised results of this EA on this symbol, including commission and swap.
8. Execution Quality Monitor, Execution Guard, and Order Price Variation
8.1. Why execution matters and what the EA measures
Gold often fills at a worse price than requested when the market moves fast. This difference is called slippage. Short-term trading is more sensitive to slippage than swing trading, and the quality of execution differs a lot between brokers and account types.
AI Gold Ultimate measures slippage on your own account, always, without any setting:
- For every waiting order that triggers: the difference between the order price and the actual fill price.
- For every position closed by its stop loss: the difference between the stop loss price and the actual close price.
Only slippage against you counts as positive; a better fill counts as negative. The EA keeps the most recent 30 measurements from the last 60 days. Several fills within the same minute (for example during one price spike) are counted as one measurement, so a single market event cannot dominate the result. Measurements are saved per trading account, symbol, and Magic number (base) , so they survive a terminal restart.
The Execution (avg slip) row on the dashboard shows the result in Gold price units (0.10 = 10 cents):
| Dashboard shows | Meaning |
|---|---|
| collecting (7/20) | Not enough fills yet to judge execution. |
| 0.06 GOOD | Average slippage up to 0.10: good execution for this EA. |
| 0.18 FAIR | Average slippage from 0.10 to 0.25: acceptable. |
| 0.35 POOR | Average slippage above 0.25: execution is reducing the edge of the most sensitive short-term setups. Consider the options below. |
| ... | GUARD | The Execution Guard is currently reducing or pausing at least one setup. |
Once a day the journal also shows Execution quality: average slippage 0.12 over the last 30 fills (FAIR).
8.2. Execution guard (auto)
When Execution guard (auto) = true and at least 20 measurements are available, the EA compares the measured average slippage with the tolerance of each short-term setup. Each setup has its own tolerance, because some setups handle slippage much better than others.
- When slippage approaches a setup's tolerance, that setup trades at half its normal lot.
- When slippage exceeds the tolerance, that setup is paused (no new orders).
- When execution improves, the setup returns to half size and then to normal size automatically. The return thresholds are lower than the reduction thresholds, so the EA does not switch back and forth on small changes.
- Swing setups (09-12) are never reduced or paused by the guard.
Every change is written to the journal, for example Execution guard: setup 05 paused (average slippage 0.31 over 24 fills). or Execution guard: setup 05 back to normal size (...) .
When to use it: turn it on if the dashboard shows POOR , or if you cannot monitor execution yourself. On a broker with good execution the guard rarely acts, but it can still reduce profit slightly during short periods of wider slippage.
8.3. Order price variation
Many traders place orders at similar price levels. When a large number of identical orders sit at exactly the same price, fills at that price can become worse. With Order price variation = true, the EA shifts the entry price of each short-term setup by a small, fixed amount (at most 0.30 of Gold price, different for each setup). The shift is calculated from your account number, so it stays the same on your account but differs between accounts.
- The effect on performance is small in testing, but orders, entry prices, and results will not exactly match the default configuration, other accounts, or published screenshots.
- Backtests with this option on can differ slightly between trading accounts.
8.4. Execution-safe settings file
An Execution-safe settings file (.set) is available from the author for brokers with weaker execution. It changes only these inputs compared with the defaults:
- Trading setup 04 , Trading setup 05 , Trading setup 07 , Trading setup 08 = false (the short-term setups that are most sensitive to slippage).
- Execution guard (auto) = true and Order price variation = true.
- News filter = Major USD events.
To load it: open the EA properties, go to the Inputs tab, click Load, and select the file. Note that the Strategy Tester does not reproduce real broker slippage, so this file shows less profit in a backtest than the defaults. Its purpose is to protect results on accounts where execution is poor in live trading.
9. Trading Schedule and Weekend Handling
- The EA prepares new orders from Monday to Friday and does not send trade requests during the daily rollover hours or in the first minute after the market reopens.
- Friday cut-off: at 21:57 server time, or 3 minutes before your broker's Friday session end if that is earlier, all short-term waiting orders are removed and no new orders are placed until the next week. Swing waiting orders stay in place.
- Close trades before weekend = true closes all open positions of the EA about 25 minutes before the cut-off.
- On a Netting account, while a position is open the EA removes its other waiting orders and does not place new ones.
10. Backtesting Guide
- Open the Strategy Tester (View > Strategy Tester or Ctrl+R) and select AI Gold Ultimate.
- Select your broker's XAUUSD symbol. The timeframe does not matter.
- For the most realistic result, use the model Every tick based on real ticks. 1 minute OHLC is faster and useful for long periods, but it cannot reproduce fast price movements in detail.
- Set your real deposit, account currency, and leverage.
- Click Start with the default inputs first, then test your own changes.
Notes:
- The news filter is skipped in the Strategy Tester (the dashboard shows Live only ).
- The Strategy Tester fills orders more cleanly than a real broker, so live results usually include more slippage than the backtest. Use the dashboard's execution measurement on your live account to see the real effect.
- History quality and broker server time strongly affect a Gold backtest. Compare balance and equity drawdown, not only net profit.
11. Troubleshooting
The EA does not start: "Invalid input"
The Experts tab shows the reason:
- lot settings must be positive : Fixed lot , Step: balance per step , and Step: lot added per step must be above 0, and Max lot per trade (0 = broker) must not be negative.
- risk must be between 0 and 10% : check Risk: % of equity per trade .
- max trades 1-50 and max waiting orders 1-100 : check Max open trades and Max waiting orders .
- exposure 0-100%, spread, news minutes, slippage and magic must not be negative : check those inputs.
- no trading setup is enabled for the selected trading style : enable at least one setup that belongs to the selected Trading style .
No trades for a while
This is normal: the setups wait for their own conditions. Check the status line and the journal. Messages that start with New orders paused: give the reason: spread above the limit , news pause , max open trades reached , max pending orders reached , or netting account: one position at a time . In Strict selectivity, or with the Execution Guard pausing setups, fewer orders are placed.
The lot is different from what I expected
In Adaptive mode the AI weight changes every short-term order's lot (section 6.1). The broker's lot step, minimum lot, free margin, and Max margin use, % equity (0 = off) can also change or skip an order; the journal explains each case with a line that starts with Order skipped: .
"Order skipped: exposure or free-margin limit reached"
The new order does not fit within free margin or Max margin use, % equity (0 = off) . Reduce risk, reduce the number of setups, or review your leverage.
"Netting account detected"
Your account uses netting mode. The EA keeps one position at a time. Use a Hedging account for the full system.
"this symbol does not accept stop orders with SL/TP"
The broker symbol does not support the order type the EA requires. No new orders will be placed. Use a standard XAUUSD symbol or contact your broker.
12. Pausing and Removing the EA Safely
- Pause everything: turn off the Algo Trading button. The EA stops sending any request, including position management, but open positions keep their stop loss and take profit on the broker's server.
- Remove the EA: right-click the chart, choose Expert List or Expert Advisors > Remove. Waiting orders created by the EA are not deleted automatically; delete them in the Trade tab if you stop using the EA. Open positions keep their stop loss and take profit.
- Move to another computer or VPS: install the product through My Purchases, attach it with the same Magic number (base) , and only then remove it from the old terminal. Never run two copies with the same magic number on the same account.
13. Live-Trading Checklist
- The EA has been tested on a Demo account with your broker.
- Broker server time follows the New York close (GMT+2 / GMT+3).
- Hedging account, XAUUSD symbol, stable connection or VPS.
- Lot mode and risk are suitable for your balance; you understand that Adaptive mode varies the lot.
- Only one copy of the EA per account and symbol, or different Magic number (base) values.
- The dashboard shows AI ENGINE ACTIVE .
- After about 20 fills, check Execution (avg slip) and decide on the options in 07 | EXECUTION.
14. Support Information
When requesting support through the product comments or MQL5 private messages, please provide:
- A screenshot of the Inputs tab.
- A screenshot of the chart dashboard.
- Account type (Hedging or Netting), account currency, and leverage.
- The broker name, broker server time, and exact symbol name.
- A copy of the relevant Experts tab lines with their timestamps (set Journal detail = Detailed if asked).
- A clear description of the expected and actual behaviour.
Product updates are available to existing buyers through Market > My Purchases in MetaTrader 5.


