Strategy Guide · Gold Futures

Gold Futures Pine Script Strategy for Prop Firms

GC and MGC are among the best futures contracts for prop firm algo trading — high volatility, 23-hour market access, clear session structure, and a tick value that scales well with micro sizing. Here is everything you need to build and automate a gold futures strategy.

Why gold futures work well for prop firm algos

Gold futures (GC on COMEX) have a unique combination of characteristics that make them particularly well-suited for automated prop firm trading:

GC vs MGC — which contract for prop firm sizing

The single most important decision when setting up a gold futures strategy for a prop firm is choosing the right contract size. Getting this wrong is the most common reason algorithmic traders blow evaluation accounts.

GC — standard gold futures

GC is priced in dollars per troy ounce. The contract covers 100 troy ounces. Each point of price movement equals $100. The minimum tick size is 0.10 points, so each tick is worth $10. Intraday margin at Tradovate is typically $1,500–$2,000 per contract, though this varies.

If GC moves 10 points against you (a routine move during the London-NY overlap), that is a $1,000 loss on one contract. On a prop firm account with a $2,500 trailing drawdown, a single GC contract with a 10-point stop uses 40% of your entire drawdown buffer on one trade. This is overleveraged for most evaluation account sizes.

MGC — micro gold futures

MGC is exactly 1/10th of a GC contract. Each point of movement equals $10. Each tick (0.10 points) equals $1. Intraday margin is approximately $150–$200 per contract. A 10-point move on one MGC contract is $100 — manageable even on a $10k evaluation with a $1,000 drawdown.

MGC is the correct choice for most prop firm evaluation accounts. You can scale up to multiple MGC contracts as the account grows or as you demonstrate consistent profitability.

Contract selection by account size

Account Size Drawdown Buffer Recommended Contract Starting Contracts Max Risk/Trade (2%)
$10,000 $1,000 MGC 1 $20 (2 points)
$25,000 $1,500 MGC × 2–3 2 $50 (5 points × 1 MGC)
$50,000 $2,500–$3,000 MGC × 3–5 3 $100 (5 points × 2 MGC)
$100,000+ $5,000+ 1 GC or MGC × 8–10 1 GC / 8 MGC $200–$500 target range
The 2% risk per trade column is a guideline, not a hard rule. Many prop firm traders use 1% or 1.5% to give themselves more room for consecutive losers before hitting the drawdown floor. Scale down if you are early in an evaluation with little buffer built up.

Gold trading sessions and when to trade

Gold is a global market that responds to price action in Asia, Europe, and North America. Understanding which sessions to trade — and which to avoid — is one of the highest-leverage decisions for an automated strategy.

London open — 3:00am to 5:00am ET

European markets open at 3am ET and large institutional players enter the gold market. This creates the first significant directional move of the day. Volume is good but not at its peak. Strategies that trade this session look for breakouts from the tight overnight Asian range. Risk is higher because news releases from Europe (ECB data, UK inflation, etc.) can create sharp reversals without warning.

New York overlap — 8:00am to 11:30am ET

This is the single best window for gold futures automation. Both London and New York are active simultaneously, creating the day's highest volume and tightest bid-ask spreads. Economic data releases (CPI, PPI, NFP, FOMC) hit during this window, driving the largest directional moves. Most Pine Script strategies for GC/MGC are optimized for this 3.5-hour window.

A session filter in your Pine Script strategy should restrict entries to between 8:00am and 11:30am ET (or 8:30am to 11:00am if you want to avoid the pre-data noise). After 11:30am, volume drops sharply and whipsaw risk increases.

Afternoon NY session — 1:00pm to 5:00pm ET

Volume picks up again slightly in the early afternoon but is generally lower quality for algorithmic strategies. Gold often consolidates or mean-reverts in this window. Most strategies close all positions by 11:30am or 1:00pm to avoid end-of-day drift. Leaving positions open into the 5pm ET settlement can create unwanted gap risk at the Sunday 6pm reopen.

Asian session — 6:00pm to 2:00am ET

Low volume, tight ranges, and high noise. Automated strategies should avoid this session entirely. Overnight holds during Asian hours expose you to gaps at the London open with no ability to react. Most prop firm strategies implement a hard close of all positions by 3:00pm ET at the latest to avoid overnight exposure.

Key Pine Script parameters for GC/MGC strategies

Here are the most important parameters to configure correctly when building or adapting a gold futures Pine Script strategy.

ATR-based stop losses

Gold's average daily range varies significantly by market conditions — from 8 points on a quiet day to 40+ points during FOMC or CPI releases. A fixed-point stop (e.g., "always stop at 5 points") will be too tight on volatile days and too wide on quiet days. ATR-based stops adapt automatically.

A standard configuration for GC/MGC on the 15-minute or 30-minute timeframe:

// ATR stop loss for gold futures atrLen = input.int(14, "ATR Length") atrMult = input.float(1.5, "ATR Multiplier", step=0.1) atr = ta.atr(atrLen) // Stop distance in points stopDistance = atr * atrMult // For MGC: $10/point — risk in dollars // stopDistance * 10 = dollar risk per MGC contract stopDollars = stopDistance * 10 // MGC // stopDollars = stopDistance * 100 // for GC

At an ATR of 3 points on the 15-minute chart and a 1.5× multiplier, the stop is 4.5 points — $45 per MGC contract or $450 per GC contract. Adjust the multiplier based on your drawdown buffer and risk tolerance.

Session time filter

Pine Script's time() function and session strings handle this cleanly. The session string for the NY overlap on gold is "0800-1130" in your timezone settings:

// Session filter — ET timezone inSession = not na(time(timeframe.period, "0800-1130", "America/New_York")) // Only allow entries during session longCondition = buySignal and inSession shortCondition = sellSignal and inSession // Close all positions at session end closeAll = ta.change(time("D")) or not inSession

Point value — setting correctly for backtesting

In TradingView's Strategy Settings, you must set the correct point value for your instrument or backtest P&L will be completely wrong:

In Pine Script v5 you can also set this programmatically at the strategy declaration:

// For MGC — micro gold strategy("MGC Range Expansion", overlay=true, default_qty_type=strategy.fixed, default_qty_value=1, commission_type=strategy.commission.cash_per_contract, commission_value=0.85) // ~$0.85/contract commission Tradovate

Daily loss circuit breaker

For firms with a daily loss limit (Topstep: $1,000 on 50k), your strategy needs to track intraday P&L and halt entries once the limit is approached. For Apex (no daily limit during eval), you can omit this but it is still good practice:

// Daily circuit breaker dailyLossLimit = input.float(-800, "Daily Loss Limit ($)", maxval=0) var float dayStart = na var float dayPnL = 0 if ta.change(time("D")) dayStart := strategy.equity dayPnL := 0 dayPnL := strategy.equity - dayStart tradingAllowed = dayPnL > dailyLossLimit

Prop firm rules most relevant to gold trading

Overnight position policy

Most futures prop firms do not prohibit overnight positions in gold — unlike some equity-index firms that enforce intraday-only rules. However, holding overnight on GC/MGC exposes the account to gap risk at market open (6pm ET Sunday or daily session starts). From a risk-management perspective, most automated strategies close all gold positions before 3pm ET regardless of the firm's rules. The gap risk simply is not worth the potential overnight drift.

Leverage and margin considerations

Prop firms typically use their broker's intraday margin rates (lower than overnight margin). Tradovate's intraday margin for MGC is approximately $150–$200 per contract. At a 50k account with a $2,500 drawdown buffer, you could theoretically run 12+ MGC contracts before hitting margin limits. However, position sizing should be driven by risk (% of drawdown) not margin availability — leverage kills prop firm accounts, not lack of signals.

News event handling

CPI, PPI, NFP, and FOMC releases cause gold to spike 20–50+ points in seconds. Most automated strategies should implement a news filter that disables trading 5 minutes before and after scheduled high-impact releases. While no prop firm rule prohibits trading through news, the slippage and whipsaw behavior during these events frequently triggers stops at poor prices, creating losses that look like strategy failure rather than news risk.

A simple approach: use an economic calendar input parameter to define daily blackout windows (e.g., 8:25–8:35am on NFP days). Our GC/MGC strategy includes a user-configurable news filter toggle for exactly this purpose.

GC/MGC Range Expansion Momentum Strategy

Our gold futures strategy trades the New York session momentum with ATR-based stops, session filters, and pre-built configurations for Apex (no daily limit) and Topstep ($1,000 daily limit). TradersPost alert messages included.

View Strategy Browse All Guides