Position sizing on gold trips up traders who arrive from forex, because the contract is 100 troy ounces rather than 100,000 currency units and because brokers disagree on whether a gold pip is a $0.10 or $0.01 price move. This guide states the contract math plainly, resolves the pip-convention confusion, works a full risk-based lot-size example, and shows how to read the true tick value programmatically in MQL5 so your EA sizes correctly on any broker. Educational material only, not financial advice — gold is a volatile, gapping instrument and trading it carries a real risk of loss.
On the standard XAUUSD contract, 1.0 lot is 100 troy ounces, so every $1.00 move in the gold price changes a one-lot position's value by $100 — equivalently, a $0.01 move is worth $1 per lot and a $0.10 move is worth $10 per lot. To size a position from risk, divide the money you are willing to lose by the dollar value of your stop distance per lot: lots = risk amount ÷ (stop distance in dollars × 100).
That is the whole calculation, and it is simpler than forex sizing in one way — the P&L currency is already USD, so there is no quote-currency conversion for a USD account — but it hides two traps that generate endless confusion.
Trap one: the word pip has no fixed meaning on gold. In forex a pip is standardised (0.0001 for most pairs). On XAUUSD, some brokers and calculators call a $0.10 move a pip, others call a $0.01 move a pip, and platform point definitions differ again. Two calculators can disagree by a factor of ten while both being internally consistent.
Trap two: the contract size is a broker setting, not a constant. 100 oz per lot is the widespread standard, but brokers can and do list gold symbols with different contract sizes (10 oz variants and other sizes exist, sometimes under suffixed symbol names). Every downstream number — pip value, margin, risk per lot — scales with it.
The reliable procedure is therefore: confirm the contract size from your broker's symbol specification, express your stop as a raw dollar price distance (sidestepping the pip ambiguity entirely), and only then divide. The sections below work through each step and show how to make the same calculation broker-proof in code.
The de facto standard retail gold CFD mirrors the futures-style convention: one lot = 100 troy ounces. From that single number the useful values follow mechanically:
Notional value is price × 100 per lot — with gold in the low thousands of dollars per ounce, a single lot controls hundreds of thousands of dollars of metal. At 1:100 leverage the margin for one lot is roughly 1% of that notional, which is why gold margin requirements surprise traders used to sizing majors: the notional per lot is several times that of a standard FX lot, and the daily range in dollar terms is typically wider too.
Now the caveat that justifies this section's title: none of the above is guaranteed for your symbol. Brokers publish the authoritative values in the contract specification — on MetaTrader, right-click the symbol and open Specification, and read Contract size, Tick size, and Tick value directly. Symbols named XAUUSD.m, GOLD, GOLDmicro and similar can carry different contract sizes on the same broker. A position-size calculation inherited from a different broker's convention is not slightly wrong; it is wrong by whatever factor the contract sizes differ, which turns an intended 1% risk into 10% quickly. Sixty seconds reading the specification eliminates the entire class of error, and any calculator you use should let you override the contract size rather than hard-coding 100.
Ask three traders what a pip is on XAUUSD and you can get three answers, all defensible. The confusion has a specific structure, so it can be resolved rather than argued about.
On most platforms gold is quoted to two decimals (e.g. a price like 2412.37). The point — the smallest quoted increment, MetaTrader's _Point — is then $0.01. Many brokers and most retail commentary call a $0.10 move a pip by analogy with forex (where a pip is ten points on 5-digit quotes). But a substantial minority of brokers, tutorials, and calculators treat $0.01 as the pip, i.e. pip = point. Neither faction is authoritative because pip is a convention, not a specification field: the platform defines point, tick size, and tick value; it never defines pip.
Concretely, per standard 100 oz lot: a $0.01 move is $1, and a $0.10 move is $10. So when one calculator reports gold pip value = $1 and another reports $10, they are describing the same contract through different pip definitions — a factor-of-ten disagreement with real consequences if you feed it into a risk per pip × pips of stop sizing formula and take the pip count from a source using the other convention. A 300-pip gold stop is $30 per lot in one convention and $300 in the other.
The robust fix is to stop using pips on metals altogether. Express your stop as a dollar price distance — a stop from 2412.00 to 2404.00 is $8.00, unambiguously — and compute risk per lot as distance × contract size. Every quantity in that expression comes straight from the chart and the specification, and no convention can silently inject a 10× error. Our calculator displays both pip conventions side by side for exactly this reason: not to bless either, but to make visible which one any other tool you use has assumed.
Assemble the full calculation once, slowly, with every unit visible. The inputs: account balance $10,000; chosen risk per trade 1%, i.e. $100; a long setup with entry at 2412.00 and stop at 2404.00, a stop distance of $8.00; broker specification confirms contract size 100 oz, USD account.
Step 1 — dollar risk per lot. Loss per lot if the stop is hit = stop distance × contract size = 8.00 × 100 = $800 per lot.
Step 2 — lots. lots = risk ÷ loss per lot = 100 ÷ 800 = 0.125 lots.
Step 3 — round down to the broker's volume step. With a step of 0.01, 0.125 rounds to 0.12 lots — down, never up, because rounding up means risking more than you decided. Realised risk at 0.12 lots: 0.12 × 800 = $96.
Step 4 — sanity checks. Notional at 0.12 lots ≈ 2412 × 100 × 0.12 ≈ $28,944; margin at 1:100 ≈ $289 — comfortably inside the $10,000 account, but worth checking on smaller accounts where a valid risk calculation can still exceed available margin. Spread and slippage: gold spreads are wide relative to majors and widen sharply around news; a $0.35 spread on a $8.00 stop is over 4% of the stop distance before the trade begins, and a fast market can fill the stop worse than 2404.00. The calculation above prices the intended loss; the realised loss can exceed it.
Note what the calculation never needed: a pip. Dollars of distance, ounces of contract, dollars of risk. If a tool forces pip inputs on you, translate carefully using whichever convention it documents — and if it does not document one, distrust it. And to be explicit: correctly sizing a position bounds the intended loss per trade; it says nothing about whether the trade or the strategy behind it has any edge.
Hard-coding gold arithmetic into an EA reproduces every trap above at machine speed, so the correct move is to ask the platform for the numbers at runtime. In MQL5 the two fields that matter are SYMBOL_TRADE_TICK_SIZE (the price increment) and SYMBOL_TRADE_TICK_VALUE (that increment's worth in account currency per lot). Loss per lot for any stop distance is then distance ÷ tick size × tick value, which is convention-free and works identically on 100 oz gold, 10 oz gold, indices, or FX:
5
// Educational only — validate before trading; not financial advice.
double LotsForRisk(double riskMoney, double stopDistancePrice)
{
double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
if(tickSize <= 0.0 || tickValue <= 0.0 || stopDistancePrice <= 0.0)
return 0.0;
double lossPerLot = stopDistancePrice / tickSize * tickValue;
double lots = riskMoney / lossPerLot;
double step = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP);
double minLot = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN);
double maxLot = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MAX);
lots = MathFloor(lots / step) * step; // round DOWN to the step
if(lots < minLot)
return 0.0; // refuse, do not round up
return MathMin(lots, maxLot);
}Three behaviours in that function are deliberate and worth copying. It rounds down to the volume step, so realised risk never exceeds intended risk. It returns 0.0 rather than the minimum lot when the computed size falls below SYMBOL_VOLUME_MIN — silently substituting the minimum lot is how small accounts end up risking several percent on a trade sized for one. And it validates its inputs, because a zero tick value (seen transiently on some symbols at startup) would otherwise divide into a huge position.
On TradingView, syminfo.mintick and syminfo.pointvalue play the equivalent roles for Pine strategies, with the same principle: read, never assume. Whatever the platform, sizing code decides real money on every trade — test it against the broker specification by hand before trusting it, and remember that perfect sizing arithmetic does not make a strategy profitable. Gold's volatility, spreads, and weekend gaps mean a real risk of loss on every position, however precisely it was calculated.
Educational only — not financial advice. Trading involves substantial risk of loss.