Gold Trading Strategies: Symbols, Sessions and Risk
A gold trading strategy specifies the instrument, entry, exit, position size and trading session before a trade is placed. Start with the exact symbol: XAUUSD quotes, COMEX futures and gold ETF shares have different units and trading conditions. The same price signal can therefore produce different cash exposure and backtest results.
Draft the gold strategyKey Takeaways
- Record the full TradingView symbol, data provider, timeframe and session before comparing results.
- GC represents 100 troy ounces and MGC represents 10. An ETF share or a broker lot is a different unit.
- Test trend continuation and mean reversion as separate hypotheses with explicit failure conditions.
- Include costs, gaps and futures rolls; preserve an untouched test period before tuning parameters.
Choose the gold instrument before the indicators
XAUUSD is a quote for gold in US dollars, but the symbol alone does not specify a broker contract. Identify the provider and its instrument terms. CME standard Gold and Micro Gold futures have published contract sizes and expiry rules. GLD shares seek to reflect gold bullion prices less the trust expenses; their share price is not a dollar-per-ounce quote. These examples cover different forms of gold exposure, not interchangeable backtest data.
| Instrument | Unit | Record before testing |
|---|---|---|
| XAUUSD spot or CFD feed | Quote in USD per troy ounce; order units depend on the provider | Provider, lot size, spread, financing, trading hours and availability |
| COMEX GC futures | 100 troy ounces; $0.10 per ounce tick = $10 per contract | Contract month, commission, tick slippage, expiry and roll policy |
| COMEX MGC futures | 10 troy ounces; $0.10 per ounce tick = $1 per contract | Its own fills and costs; smaller size does not remove loss risk |
| GLD shares | Shares priced in USD, not ounces | Regular or extended session, spread and share quantity |
An illustrative trend strategy for gold
This is a long-only research specification, not a tested recommendation. Use a standard daily candlestick chart of one chosen instrument. The premise is that a breakout can continue while the broader price trend is rising. Sideways trading can produce repeated losing entries.
- Signal: a completed daily close exceeds the highest high of the preceding 20 completed bars and is above the 50-period EMA.
- Entry: while flat, submit one market entry after that close. With default TradingView strategy timing, the fill is normally at the next available bar open.
- Risk: freeze ATR(14) from the signal bar. Set a protective stop two ATR below the actual entry fill, without widening it later.
- Exit: keep the stop active; otherwise submit a market exit when a completed close falls below the lowest low of the preceding 10 bars.
- Position rule: no adding to an open trade. Reject the entry when the smallest permitted position exceeds the chosen risk budget.
A separate mean reversion experiment
This illustrative long-only setup tests a return toward the recent average after a short decline. Use a 15-minute chart with Monday-to-Friday entry signals from 09:30 up to, but excluding, 12:00 in America/New_York time. Run it independently from the trend setup so that its results remain attributable to its own rules. A persistent selloff can keep price below the average and trigger the stop before any recovery.
- Signal: the previous completed close was below its 20-period SMA minus two 20-period population standard deviations; the latest close is back above its own lower band but still below its SMA.
- Entry: while flat and inside the selected window, submit a market entry for the next available tick. Take at most one position at a time.
- Freeze the signal-bar ATR(14) and SMA. Place a stop one ATR below the actual fill and a limit target at that frozen SMA.
- If the entry gaps above the frozen target, close the position at the next available tick and retain the trade and its costs in the test. Do not delete inconvenient fills.
- If neither exit fills, submit a market exit after eight completed bars following entry. Also submit a market exit at the 15:30 New York bar close if still holding; a missing bar or market closure delays execution.
Translate the stop into dollars before sizing
For a USD account trading GC or MGC, planned price risk per contract equals stop distance in dollars per ounce multiplied by contract ounces. Add a per-contract allowance for commissions and slippage, then divide the risk budget by that total and round down to whole contracts. Check margin separately: margin is collateral, not a maximum loss. Gaps can exceed the planned risk.
- Hypothetical example: a $10-per-ounce stop is $1,000 of price risk for one GC or $100 for one MGC, before costs.
- With a hypothetical $250 budget and $10 round-trip cost allowance per MGC, floor(250 / 110) permits two MGC contracts. One GC exceeds that budget even before costs.
- For GLD, multiply the stop distance in dollars per share by shares. For XAUUSD, use the actual broker unit or lot multiplier, minimum order increment and account-currency conversion.
Fix sessions, gaps and futures rolls
Define the entry window with a named time zone, such as America/New_York, and keep it fixed during the experiment. Pine session calculations use the exchange time zone unless another is specified; changing the displayed chart time zone does not redefine the script session. Match the window to available bars and state whether it limits entries only or also forces an exit. There is no universal best trading hour established by these examples.
- GC and MGC have an electronic session and a daily break. Check current exchange and holiday schedules instead of treating a chosen morning window as the market open.
- An ETF chart may exclude overnight trading. A stop crossed in a gap can fill worse than its level; TradingView models a price-based order crossed between bars at the following open.
- For futures, record the contract month and an explicit roll date or rule. A continuous chart joins contracts; record its adjustment setting and verify trades around each roll against the underlying contracts.
- Keep spread, commissions, financing where applicable and slippage assumptions visible. Investigate bars where both target and stop were touched rather than assuming the favorable order filled first.
Build the rules, then compare a bounded parameter range
Give Pine Script AI Coding Agent the selected symbol, units, session, entries, exits and cost assumptions to draft the strategy. Review the generated logic and compile it in TradingView. Strategy Optimizer can compare exposed inputs on an existing TradingView strategy. Keep the data feed, position sizing, costs and test dates fixed so that a parameter comparison answers a defined question.
- For the trend experiment, compare a small predeclared set of breakout lengths while keeping the stop rule unchanged.
- Reserve a later period before choosing parameters. Inspect drawdown, trade count and losses as well as net profit on that untouched period.
- Recheck the chosen rule on each intended instrument. Results on a continuous GC chart do not establish executable results on an XAUUSD broker feed or GLD.
Pineify next step
Turn your gold strategy specification into Pine Script
Start with one instrument and a complete rule set. Use Pine Script AI Coding Agent to draft the code, then compare selected inputs with Strategy Optimizer after checking the TradingView strategy behavior.
Sources and verification
Last verified:
- TradingView: Back-adjustment of continuous futures
- CME Group: Gold product overview and contract sizes
- CME Group: Gold futures and options contract specifications
- OANDA UK: Product trading hours and XAU/USD lot specifications
- SPDR Gold Shares: GLD investment objective and share information
- TradingView: Strategy orders and broker emulator assumptions
- TradingView: Sessions and time zones
Educational information, not investment advice or live trading signals. All rule sets and sizing examples are illustrative and have no claimed backtest or live performance. Leveraged gold products can produce substantial losses. Historical simulations and optimized parameters do not establish future returns.