The No Job Lifestyle
Home β€Ί Guides
πŸ€– AI trading guide

Forex and Gold Trading Bot With Claude: The MT5 Route

Most forex and gold bots run on MT5. Here is how to have Claude write one, the gold details that trip people up, and the prop firm rules to check first.

πŸ—“ Updated ⏱ 2 min readβœ… 100% free
600+free guides and tools
10free trading calculators
5 mina day to stay on track
$0to read every guide

Quick answer: For forex trading with Claude, most people ask Claude to write an MQL5 Expert Advisor, install it in MT5, backtest it in the Strategy Tester and run it on a demo account. Gold (XAUUSD) moves faster and has bigger lot values than most currency pairs, so risk settings matter even more.

Trading involves risk and you can lose money. Results vary.

1Why MT5 Is the Usual Home for Forex Bots

MetaTrader 5 is free, most forex brokers offer it, and it runs bots called Expert Advisors written in MQL5, a language Claude can write.

MT5 also has a Strategy Tester for backtests and a demo account option at almost every broker. That means you can build, test and watch a bot without spending money. Forex trades 24 hours a day, five days a week, so a bot on a VPS can follow your rules while you sleep.

2How to Build a Forex Trading Bot Using Claude

Write your rules, ask Claude for an MQL5 Expert Advisor, compile it in MetaEditor and test it on demo.

A starter prompt: Write an MQL5 Expert Advisor for MT5 that trades GBPUSD on the 15 minute chart. Enter on a breakout of the London session high or low, stop loss at the other side of the range, take profit at 2 times the stop, risk 1% of the balance per trade, no trades on Friday after 18:00 server time, and add comments. Then paste it into MetaEditor, compile, fix any errors with Claude, and run it in the Strategy Tester.

  1. Write entry, exit and risk rules in plain English
  2. Ask Claude for an MQL5 Expert Advisor with inputs and comments
  3. Compile in MetaEditor and paste any errors back to Claude
  4. Backtest, then run on a demo account for a few weeks
πŸ€– Skip the hard way

The MT5 Expert Advisor route from prompt to demo chart

Get my free AI trading guide β†’

3How to Make a Gold Trading Bot With Claude

Gold works the same way, but tell Claude the exact symbol name and contract size your broker uses.

Brokers name gold differently, such as XAUUSD, GOLD or XAUUSD.m, so check your Market Watch list and give Claude the exact name. On many brokers one standard lot of gold is 100 ounces, so a 10 dollar move can mean a 1,000 dollar swing on one lot. Ask Claude to size each trade from your risk percent and stop loss, not from a fixed lot. Gold spreads also widen around big news like US jobs data, so many people add a rule to pause trading around those times.

4Prop Firm Rules to Check First

If you plan to run a bot on a prop firm challenge, read the firm's rules before you start. Breaking one can end the account.

Many prop firms limit or ban certain Expert Advisors, copy trading, trading during big news, very short holding times or using the same bot as thousands of other traders. Almost all have a daily loss limit and a total loss limit. Ask Claude to build those limits into the bot so it stops trading before it breaks a rule. When unsure, email the firm and ask in writing.

5Building It Yourself or Letting AI Trade for You

Building is a great way to learn, but it comes with testing, hosting and fixing. A ready made AI bot skips that part.

If you enjoy the process, keep improving your EA one change at a time and track every result. If you want the benefit without the upkeep, you can let AI trade for you with a ready made bot and spend about 5 minutes a day checking in. Both carry risk, so start small.

Ready to start? Our free guide on letting AI trade for you walks you through it step by step, and our ai trading guides cover the rest of this topic.

Questions people ask

Can Claude write an MT5 Expert Advisor?

Yes. Claude can write MQL5 code for an Expert Advisor from your rules. Expect to fix a few compile errors and always test on demo before real money.

Why is gold riskier for a bot than forex pairs?

Gold often moves more in a day and one lot is worth more on many brokers, so a wrong lot size hurts faster. Size trades from a risk percent, not a fixed lot.

Can I use a Claude written bot on a prop firm account?

Some firms allow Expert Advisors and some limit them. Read the rules on EAs, news trading and copy trading, and ask the firm in writing if you are unsure.

Do I need a VPS for an MT5 bot?

MT5 has to stay open for the bot to trade. A VPS keeps it running all day and night, so most people use one once the bot passes demo testing.

Related guides

Free gifts

Quit your job calculatorPassive income quizMore answersAll guides

Get my free AI trading guide β†’