Gold is one of the most popular symbols for expert advisors, and one of the easiest to get wrong. XAUUSD uses a different contract size from currency pairs, quotes its price in whole dollars and cents, and moves much more money per lot. Settings that are sensible on EURUSD can be reckless on gold. This guide covers the contract, the math and the market hours, and what they mean for an EA's inputs.
The XAUUSD contract
XAUUSD is the price of one troy ounce of gold in US dollars. At most brokers one standard lot (1.00) is 100 ounces, so 0.10 lots is 10 ounces and 0.01 lots, usually the smallest size allowed, is 1 ounce.
Most brokers quote gold to two decimal places, such as 2,400.25 in an example. A few use three decimals or a different contract size, and some name the symbol GOLD or add a suffix such as XAUUSD.m. Don't assume: check the symbol specification. In MetaTrader, right-click the symbol in Market Watch and choose Specification. The window shows:
- Contract size: ounces per lot.
- Digits: decimals in the price.
- Volume limits: the minimum lot, maximum lot and lot step.
- Margin settings: which may differ from your currency pairs.
- Swap long and swap short: the charge or credit for holding a position overnight.
- Sessions: trading hours, including any daily break.
Points, pips and pip value
A point is the smallest price step. On a two-decimal gold quote, one point is 0.01. Most traders, and our calculators, count one pip as 0.10, which is 10 points. A move from 2,400.00 to 2,401.00 is therefore 100 points, or 10 pips. Some traders call a full $1.00 move a pip, so always check which unit an EA, a signal service or an article is using.
Pip value follows from the contract size:
pip value = pip size × contract size × lots
For one standard lot that's 0.10 × 100 × 1 = $10 per pip.
| Lot size | Ounces | 1 point (0.01) | 1 pip (0.10) | A $1.00 move |
|---|---|---|---|---|
| 1.00 | 100 | $1.00 | $10.00 | $100 |
| 0.50 | 50 | $0.50 | $5.00 | $50 |
| 0.10 | 10 | $0.10 | $1.00 | $10 |
| 0.01 | 1 | $0.01 | $0.10 | $1 |
These values are in US dollars. If your account is in another currency, the broker converts them at the current exchange rate. The pip value calculator handles that conversion for gold and any currency pair.
Worked example: profit on a gold trade
Buy 0.20 lots at 2,400.00 and sell at 2,412.50 (example prices). The move is 12.50, which is 125 pips. Profit = 125 × $10 × 0.20 = $250. Counting in ounces gives the same answer: 0.20 lots is 20 ounces, and 20 × $12.50 = $250.
Margin and leverage on gold
Margin is the deposit your broker holds while a trade is open. It equals the trade's full value, its notional, divided by your leverage:
margin = lots × contract size × price ÷ leverage
At an example gold price of 2,400 and leverage of 1:100:
- 1 lot: 1 × 100 × 2,400 = $240,000 notional. Divided by 100, that's $2,400 of margin.
- 0.10 lots: $24,000 notional and $240 of margin.
Many brokers offer lower leverage on metals than on major currency pairs. At 1:20, the same 1 lot needs $12,000 of margin. Check the margin settings in the specification, or enter your own leverage in the margin calculator.
Margin isn't the same as risk. Your risk comes from lot size and stop distance. Margin only decides how many positions you can hold before the broker stops you opening more, or closes trades when free margin runs out.
Why gold moves more per lot
The same percentage move is worth more money on a lot of gold than on a lot of EURUSD, because a gold lot has a larger notional value. Here is a 1% move at example prices:
| Example prices | XAUUSD at 2,400 | EURUSD at 1.1000 |
|---|---|---|
| Contract per lot | 100 oz | 100,000 EUR |
| Notional per lot | $240,000 | $110,000 |
| Pip size | 0.10 | 0.0001 |
| Pip value per lot | $10 | $10 |
| A 1% price move | 24.00 (240 pips) | 0.0110 (110 pips) |
| Value of a 1% move per lot | $2,400 | $1,100 |
| Margin per lot at 1:100 | $2,400 | $1,100 |
The pip value is $10 on both, which makes them look alike. They aren't. A 1% move on gold covers more than twice as many pips, so a gold pip is a much smaller step compared with the market's normal noise. Gold's daily moves are also often larger in percentage terms than those of the major pairs, which widens the gap further.
The practical lesson: a 20-pip stop that might suit EURUSD is only a $2.00 price move on gold, and ordinary fluctuations can cover that quickly. Gold EAs use wider stops in pips, so to keep the same money at risk they need smaller lots. Size gold trades from the stop with the position size calculator rather than reusing a lot size from a currency pair.
Sessions and liquidity
Gold trades almost around the clock from Sunday evening to Friday evening, New York time, with a short daily break at many brokers. Activity is far from even:
- Asian session. Usually quieter, with smaller ranges, though not always.
- London session. London is a major center for physical gold trading, and liquidity rises when it opens.
- New York session. US economic data comes out in the New York morning, when US gold futures trading is at its busiest.
- The London and New York overlap. The hours when both centers are open typically bring the deepest liquidity and often the largest moves of the day.
Session times shift by an hour for a few weeks a year, because the US and Europe change their clocks on different dates. The forex market hours tool shows the sessions in your own time zone. Many gold EAs are built around the London or New York open, so make sure the EA's time inputs use your broker's server time, not your local time.
US data, yields and the dollar
Gold is priced in dollars and pays no interest, so it reacts strongly to anything that changes the outlook for US interest rates and the dollar:
- US inflation (CPI). A reading above or below expectations changes rate expectations and can move gold sharply within seconds.
- Non-Farm Payrolls (NFP). The US jobs report, usually released on the first Friday of the month at 8:30 a.m. New York time.
- FOMC decisions. Federal Reserve rate decisions and statements, usually at 2:00 p.m. New York time, followed by a press conference.
- Real yields. The return on US government bonds after inflation. Gold has tended to struggle when real yields rise, because holding it means giving up that return, and to benefit when they fall.
- The US dollar. A stronger dollar makes gold more expensive in other currencies and has often weighed on the price. A weaker dollar has often helped it.
- Risk sentiment. Many investors treat gold as a safe haven, so geopolitical shocks and market stress can lift it quickly.
These are tendencies, not rules, and the links between gold, yields and the dollar can weaken for long stretches. For an EA the point is simpler: around high-impact US releases, spreads widen, prices jump and stops can fill well away from where they were set.
Spreads, rollover and gaps
Gold's spread changes through the day, and an EA that ignores this pays for it. Three moments stand out:
- Daily rollover. Around 5 p.m. New York time, when the trading day changes, liquidity thins and spreads can widen several times over for a few minutes. On broker servers set to GMT+2 or GMT+3 this falls at midnight server time. Many brokers also pause metals trading for a short break around then; the sessions in the specification show when.
- News releases. Spreads widen just before major US data and can stay wide for a few minutes afterward.
- Weekend gaps. Gold closes on Friday and reopens on Sunday evening, New York time. The first price of the week can be well away from Friday's close, and a stop loss inside the gap fills at the first available price.
Worked example: a gap through a stop
An EA holds 0.10 lots long over the weekend with a stop at 2,390.00. Gold opens the new week at 2,382.00 (example prices). The stop fills near 2,382.00, not 2,390.00. That's 8.00, or 80 pips, beyond the stop, and at $1 per pip for 0.10 lots it adds about $80 to the planned loss.
Swap matters too. Holding gold overnight often carries a charge, and an EA that keeps trades open for weeks can lose a noticeable amount to it. Check swap long and swap short in the specification before running a slower strategy.
Setting up an EA for gold
With the mechanics clear, these are the settings to review before you run an EA on XAUUSD.
Stop and take-profit distances
Find out whether the EA's inputs are in points, pips or price. An EA written for five-digit currency pairs might read a stop of 30 as 30 points. On gold that's $0.30 of price, close to the spread itself. A stop meant to sit $3.00 away needs 300 points, or 30 pips. Look at the first trades in the strategy tester to confirm the distances are what you intended.
Maximum spread filter
Set the filter in points, based on your own account's normal gold spread. Watch the spread in Market Watch for a few days first. Say it usually sits near 25 points during London hours on your account (an example, not a typical figure): a filter at about 50 points lets normal trades through and skips most rollover and news spikes.
News filter
Pause new entries for a window around high-impact US releases such as CPI, NFP and FOMC decisions, unless the EA is built to trade them. Some EAs read an economic calendar; with others you enter the times yourself. Also check what the EA does with trades that are already open when the news hits.
Trading hours
Limit trading to the sessions the EA was tested on, set in server time, and keep it from opening trades in the minutes around rollover.
Lot sizing
Use a risk percentage based on the stop, and check the minimum lot. On small accounts the 0.01 minimum can force more risk than you planned. With a $500 balance and 1% risk, the risk amount is $5. A 100-pip stop on 0.01 lots loses 100 × $0.10 = $10, which is 2% of the account. Either the balance, the stop or the risk target has to change. Our risk management guide covers loss limits and drawdown in more detail.
Backtest on gold data
Test on XAUUSD history with variable spreads, or real ticks where your tester supports them. A fixed low spread flatters gold EAs. Our guide to backtesting in the strategy tester covers modeling modes and spread settings. Take extra care with grid and martingale EAs on gold, because a sustained trend can carry price a long way from the first entry.