AlgoPuzzle Open the Builder
← Back to all articles

Strategies

How to Build a Gold (XAUUSD) EA Without Coding: A Southeast Asia Guide

By AlgoPuzzle · Published · Updated

You can build a gold Expert Advisor without writing MQL or C#: in a no-code builder such as AlgoPuzzle you pick Gold (XAUUSD) as the asset, define the entry condition, lot size, stop loss and take profit with blocks, backtest the rule in the browser, and export it as a MetaTrader 5 or MetaTrader 4 EA or a cTrader cBot. For traders in Southeast Asia, three things decide whether a gold EA behaves as intended. First, timing: gold is usually busiest during the London and New York overlap, which falls in the local evening - 19:00 to 00:00 in Bangkok, Jakarta and Ho Chi Minh City (UTC+7) and 20:00 to 01:00 in Kuala Lumpur, Singapore and Manila (UTC+8), depending on the season - and an EA's trading hours must be set in the broker's server time, not local time. Second, size: on the common contract of 100 ounces, a $1 move in gold is $100 per 1.00 lot, so a lot that is sensible on EUR/USD can be far too large on gold. Third, units: a "pip" on gold is tiny (often 0.01), so stops in pips that work on currencies are much too tight on gold; use a price distance, a percentage of the entry price or a multiple of ATR instead. This guide covers all three with tables for every Southeast Asian time zone, then walks through building, testing and exporting a gold rule step by step.

Southeast Asian time zones at a glance

Southeast Asia spans four UTC offsets, and none of the countries uses daylight saving time. That makes the region's clocks fixed while Europe's and America's move twice a year, which is why gold's busy hours shift by an hour in local time.

CountryTime zoneUTC offsetDaylight saving
MyanmarMMTUTC+6:30No
Thailand, Vietnam, Cambodia, LaosICTUTC+7No
Indonesia (Java, Sumatra)WIBUTC+7No
Malaysia, Singapore, Philippines, BruneiMYT, SGT, PHT, BNTUTC+8No
Indonesia (Bali, Makassar)WITAUTC+8No
Indonesia (Papua, Maluku)WITUTC+9No

For forex pairs in UTC+7, Forex Market Hours in Thailand and Indonesia Time has every session in detail. This article focuses on gold and adds UTC+8.

Gold's key hours in UTC+7 and UTC+8

Gold (XAUUSD) trades almost around the clock from Monday morning to Saturday morning Southeast Asian time, with a short daily break around the 17:00 New York rollover on most brokers. Activity is not even across those hours: it usually picks up when London opens and peaks while London and New York are both open.

MomentUTC+7, early Nov - early MarUTC+7, late Mar - late OctUTC+8, early Nov - early MarUTC+8, late Mar - late Oct
Tokyo session07:00 - 16:0007:00 - 16:0008:00 - 17:0008:00 - 17:00
London opens (08:00 London)15:0014:0016:0015:00
London - New York overlap20:00 - 00:0019:00 - 23:0021:00 - 01:0020:00 - 00:00
Major US data (08:30 New York)20:3019:3021:3020:30
Daily rollover (17:00 New York)05:0004:0006:0005:00

In 2026 New York returns to winter time on November 1 and London did so on October 25; in spring, New York moves first (second Sunday of March) and London follows on the last Sunday of March. In the gap weeks, take the London rows from one column and the New York rows from the other. Gold's hours also differ by broker, so check the trading sessions in the symbol's Specification (right-click it in Market Watch).

US data releases such as the monthly jobs report and inflation figures often move gold sharply, with wider spreads and more slippage for a few minutes. An EA with tight stops is most exposed exactly then.

Gold lot size: what a $1 move costs

On the common contract size of 100 troy ounces per lot, every $1.00 change in the gold price is worth $100 on a 1.00 lot. That is the single most important number when sizing a gold EA.

LotOunces (100 oz contract)Value of a $1.00 moveValue of a $10.00 move
1.00100$100$1,000
0.1010$10$100
0.011$1$10

Gold regularly moves several dollars within an hour, so a 1.00 lot on a small account can lose a large share of it on an ordinary move. Check the "Contract size" in the symbol's Specification: some brokers and account types (cent accounts, for example) use different units. Sizing the lot from the stop distance and a fixed % of the balance avoids most of this; Position Sizing: How Much Should One Trade Risk? explains the method, and drawdown recovery math shows why large losses are so hard to win back.

Gold stops: why pips are the wrong unit

A pip on gold is usually 0.01 of a dollar, so a stop of 30 pips - normal on EUR/USD - sits only $0.30 from the entry price on gold. AlgoPuzzle follows the usual convention (on a 2-decimal quote one pip is one point), and the size of a gold pip depends on how many decimals your broker quotes. Other stop units fit gold better:

Stop unit in AlgoPuzzleValue enteredDistance at an example price of 3,000.00 (2 decimals)Loss per 1.00 lot (100 oz)
Pips300.30$30
Raw Price Distance1515.00$1,500
% of Entry Price0.515.00 (3,000 x 0.005)$1,500
2 x ATR (math block)ATR(14) = 6.0012.00$1,200

An ATR-based stop adapts to gold's volatility automatically: wider when gold is moving fast, tighter when it is quiet. ATR-Based Stop Loss Sizing explains how it works, and the units are described in Trades, stops and lot size. Whichever unit you use, combine it with Risk % of balance so the lot shrinks when the stop is wider.

How to build a gold EA in AlgoPuzzle, step by step

The steps below build a simple trend rule on gold. The rule is an example for learning the workflow, not a recommendation or a strategy with expected profits.

  1. Open the builder. Go to the AlgoPuzzle builder in your browser; nothing to install. Building needs no account.
  2. Pick the asset. Click the Asset slot of the rule and type gold. If your broker uses a different name (XAUUSDm, XAUUSD.c, GOLD), choose Custom / Other... and type the exact name from your Market Watch.
  3. Pick the timeframe. For example 1 Hour (H1). The rule is checked once per new candle of this timeframe.
  4. Set the entry (IF). For example: Moving Average (50) crosses above Moving Average (200). Conditions are explained in Conditions; for the indicators themselves see RSI, MACD & Moving Averages, Quickly.
  5. Set the trade (THEN). Open BUY with Risk % of balance 1, stop loss 2 x ATR(14) and take profit 4 x ATR(14). Use a second rule with Open SELL if you want both directions.
  6. Limit the hours. Change "Trade any time" to "only at set times" and enter the window in broker server time (see the next section).
  7. Backtest it. Switch to Backtest, enter your broker's typical gold spread, choose a period and run it. Gold is one of the markets the built-in backtest covers. See Running a backtest.
  8. Check the robustness. Open the Monte Carlo tab to see a bad-case drawdown from the same trades in a different order (Monte Carlo analysis).
  9. Export. Click Export to MT5, Export to MT4 or Export to cTrader (a free account is needed) and install the file as described in Export to MT5, MT4 and cTrader.
  10. Confirm, then demo. Run the exported EA in the platform's tester (MT5 Strategy Tester guide) and on a demo account before using real money.

Trading hours for a gold EA: local time vs server time

An EA reads the broker's server clock, so a time filter has to be written in server time. Many brokers run MetaTrader servers at UTC+2 in winter and UTC+3 in summer, switching on the US dates; with such a server the London - New York overlap is 15:00 to 19:00 server time all year.

Your time zoneSubtract to get server time (early Nov - early Mar)Subtract (early Mar - early Nov)Overlap window to enter in AlgoPuzzle
UTC+6:30 (Myanmar)4 h 30 min3 h 30 min15:00 - 19:00
UTC+7 (Thailand, Vietnam, Indonesia WIB)5 hours4 hours15:00 - 19:00
UTC+8 (Malaysia, Singapore, Philippines)6 hours5 hours15:00 - 19:00
UTC+9 (Indonesia WIT)7 hours6 hours15:00 - 19:00

To confirm your broker's offset, compare the time in Market Watch with your local clock. In AlgoPuzzle the start time is included and the end time is not, a window may run past midnight, and outside the window the rule only stops opening new trades; open trades keep their stops. Details: Strategy rules: trading times.

Gold symbol names at different brokers

Brokers name gold differently, and an EA can only trade a symbol name that exists on your account. These are common patterns; your Market Watch shows the exact one.

Name patternTypical meaningWhat to do in AlgoPuzzle
XAUUSDPlain namePick Gold from the list
XAUUSDm, XAUUSD.m, XAUUSD.aSuffix for an account typeUsually matched automatically; otherwise Custom / Other...
XAUUSDc, XAUUSD.cOften a cent accountCustom / Other..., and check the contract size
GOLD, XAUUSD#Broker-specific namingCustom / Other... with the exact name

If the exported EA can't find the symbol, it doesn't start and says so in the Experts tab; EA Not Opening Trades in MT5? covers this and the other usual causes.

Common gold EA mistakes and how to avoid them

MistakeWhat happensFix
Stops in pips copied from a forex EAStop hit by normal noise within minutesRaw distance, % of entry or ATR multiple
Forex-sized lots on goldOne ordinary move takes a big share of the accountRisk % of balance; check the contract size
Trading hours typed in local timeEA trades the Asian session instead of the overlapConvert to server time (table above)
Entries around the daily rolloverWide spreads at 04:00-06:00 local timeExclude the rollover hour; see how spread raises your break-even
Martingale or grid on goldLosing positions grow during long trendsRead why martingale and grid strategies blow up
Tuning until the backtest looks perfectResults that don't repeat liveRead What Is Curve Fitting?
Several gold rules on an MT5 netting accountTrades merge into one positionUse a hedging account; see MT4 vs MT5 vs cTrader

Where to go next

You want toRead
Understand what an EA isWhat Is an Expert Advisor (EA)?
Pick a simple first ruleAlgo Trading Strategies for Beginners: 5 Simple Rule Types
See backtested strategies, including goldStrategy of the Week
Read the backtest numbersProfit Factor and Trade Expectancy
Move an existing MT4 gold EAConvert an MT4 EA to MT5 or cTrader
Compare no-code buildersfxDreema vs EA Builder vs MQL5 Wizard vs AlgoPuzzle
Pass a prop firm challenge with an EAWhy Profitable EAs Fail Prop Firm Challenges

Common questions

Can I build a gold EA without coding?

Yes. In a no-code builder such as AlgoPuzzle you choose Gold as the asset, set the entry condition, lot size, stop loss and take profit with blocks, backtest the rule in the browser, and export it as a MetaTrader 5 or MetaTrader 4 Expert Advisor or a cTrader cBot. No MQL or C# is needed.

What is the best time to trade gold in Malaysia, Singapore or the Philippines?

In UTC+8 (Kuala Lumpur, Singapore, Manila) gold is usually most active during the London and New York overlap: 21:00 to 01:00 from early November to early March and 20:00 to 00:00 from late March to late October. Major US data releases at 08:30 New York time fall at 21:30 in winter and 20:30 in summer.

What is the best time to trade gold in Thailand, Indonesia or Vietnam?

In UTC+7 (Bangkok, Jakarta, Ho Chi Minh City) the London and New York overlap runs from 20:00 to 00:00 from early November to early March and from 19:00 to 23:00 from late March to late October. The Asian session, 07:00 to 16:00 local time, is usually calmer for gold.

How much is one pip on gold?

It depends on how many decimals your broker quotes. With gold quoted to 2 decimals (for example 3,000.00), a pip under the usual convention is 0.01, so a 30 pip stop is only $0.30 away. That is why gold stops are usually set as a price distance, a percentage of the entry price or a multiple of ATR rather than in pips.

How much money is a $1 move in gold per lot?

On the common contract size of 100 troy ounces per lot, a $1.00 move in the gold price is $100 per 1.00 lot, $10 per 0.10 lot and $1 per 0.01 lot. Check the contract size in your broker's symbol specification, because some accounts use a different one.

Does AlgoPuzzle work with brokers in Southeast Asia?

AlgoPuzzle runs in the browser and exports standard MetaTrader 5, MetaTrader 4 and cTrader files, so it works with any broker that offers one of those platforms. If the broker names gold differently, such as XAUUSDm or XAUUSD.c, type that exact name in the rule's Asset slot under Custom / Other.

Build a gold EA for free