Gold trading robot in MetaTrader 5: the practical guide
This guide explains what an OPR robot on gold is, how to choose the right account and symbol with your broker, how to install an Expert Advisor in MetaTrader 5 and why server time matters for a robot that trades at set times.
What is an OPR robot?
OPR stands for "Opening Price Range": the price range gold draws at the start of a session. An OPR robot, or opening range breakout robot, waits for the price to break out of this range and takes a position in the direction of the breakout, following rules set in advance.
- The opening range. At the start of the session, the robot records gold's high and low. This range is the reference for the rest of the session.
- The breakout. When a candle closes beyond the range, the robot enters in the direction of the breakout: long through the top, short through the bottom.
- Risk set in advance. The stop loss goes on the other side of the range, the target at a multiple of the risk. If the breakout fails, the loss stays the planned one.
OPR Gold EA applies this method to gold (XAUUSD) over five sessions, from night to evening Paris time, with its own settings and filters, and completes it with a trend follower and a month-end buy.
XAUUSD or GOLD: the name of gold at your broker
Gold priced in dollars has the symbol XAUUSD or GOLD depending on the broker. It is the same market: open the gold chart as your broker names it, on the M5 timeframe (5-minute candles) for OPR Gold EA.
Hedging or netting account?
MetaTrader 5 offers two account modes. In hedging mode, each position stays separate, even on the same symbol; in netting mode, positions on the same symbol are merged into one. OPR Gold EA needs an account in hedging mode (separate positions), the case for most MT5 "Forex" accounts. Choose a regulated broker; we do not recommend any.
Installing an Expert Advisor in MetaTrader 5
- In MetaTrader 5: File → Open Data Folder → MQL5 → Experts, then copy the .ex5 file received by e-mail into it.
- Restart MetaTrader 5, or right-click "Expert Advisors" in the Navigator, then "Refresh".
- Open a gold chart (XAUUSD or GOLD depending on your broker) in M5 and drag the robot onto it.
- "Common" tab: tick Allow Algo Trading.
- "Inputs" tab: load the preset that matches your account (standard, prop firm or cent account), then paste your licence key, tied to the account number given at purchase (live or demo).
- Turn on the Algo Trading button: the robot's panel shows your licence. Start on a demo account.
Keeping the robot running: computer, VPS or mobile?
Does the computer have to stay on?
Yes, MetaTrader must be running during trading hours. The simplest solution is a VPS (a server rented for a few euros a month), offered by most brokers.
Does the robot work on mobile (Android, iPhone)?
No: MetaTrader's mobile apps do not run Expert Advisors. The robot runs in MetaTrader on a computer or a VPS; you can then follow its trades from the mobile app, connected to the same account.
Server time: the setting that matters for a robot that trades at set times
A robot that trades at precise times needs to know what time it really is: the time shown by MetaTrader is your broker's server time, not yours. Many brokers are on GMT+3 in summer and GMT+2 in winter.
OPR Gold EA works on Paris time, whatever your broker's time zone: on a live or demo account, it works out the offset itself as soon as it is connected to the server. In MetaTrader's strategy tester, which works without a licence key, this offset is set by hand: it is the only essential setting, explained in the guide delivered with the robot.
Risk warning
Trading gold, forex and CFDs carries a high risk of losing capital, which can exceed your deposit depending on your broker. Past performance, simulated or real, is no guarantee of future performance. The amounts shown assume full reinvestment of profits and take no account of commissions, swaps or slippage at execution.
OPR Gold EA is a software tool. It is not investment advice, and its seller is not a financial adviser. Only invest money you can afford to lose, and test the robot on a demo account before any live use.