What Is a Forex Trading Bot?

A forex trading bot, also called a forex robot or forex trading robot, is a program that opens and closes trades by fixed rules, with no click from you. In MetaTrader 5 it is called an Expert Advisor, or EA, and is written in MQL5. It runs inside the platform on your computer or on a VPS. The bot follows its rules exactly, so its results depend on how good those rules are and how well they were tested.

  1. What a trading robot is and how it works Strategy types, how to check a robot and where to get one. Read the guide

How a bot trades in MetaTrader 5

  1. You set the rules: when to buy, when to sell and how much to risk.
  2. The robot checks every new price against those rules.
  3. When the conditions match, it sends the order with its Stop Loss and Take Profit.

Set Up MetaTrader 5 for a Forex Robot

A forex robot runs inside MetaTrader 5, so the platform comes first: install it, log in and switch on Algo Trading so an MT5 trading bot can place orders.

  1. MetaTrader 5 features What MT5 adds over MT4, from MQL5 to the Strategy Tester. Read the guide
  2. MT5 download and setup Install MT5 on Windows or Mac and log in to your account. Read the guide
  3. Turn on automated trading The Algo Trading button and Expert Advisor permissions in Options. Read the guide
  4. Demo account

    Connect MetaTrader 5 to live quotes and practise with virtual money.

    Open a demo account

Get a Ready-Made Forex Robot and Run It

Where to get a robot, how to attach it to a chart and how to set its risk. The sample robot that comes with MetaTrader 5 is the quickest start.

  1. Expert Advisor download Free, paid and rented robots, and how to test a paid one free. Read the guide
  2. Install an EA in MT5 Attach the built-in MACD Sample to a chart on a demo account. Read the guide
  3. Trading robot settings Lot and Stop Loss set the risk, the magic number separates robots. Read the guide
  4. Trading robot checklist Fifteen checks from installed to the first trade, each linked to its guide. Read the guide

Don’t want to set up a robot yourself? Copy a strategy. In Copy Trading you pick a trader’s strategy by its track record, and your account repeats its trades.

Browse top strategies

Build Your Own Robot With AI or MQL5

Write the rules down first. Then an AI forex trading bot builder such as ChatGPT can write the MQL5 code for you, or you edit a working robot by hand.

  1. Automated trading strategies Turn a trend, mean reversion or breakout idea into exact rules. Read the guide
  2. Build an AI trading robot From a strategy in plain words to a tested robot, no coding. Read the guide
  3. Your first MQL5 Expert Advisor Copy a complete robot, compile it in MetaEditor, change it. Read the guide
  4. ChatGPT trading bot prompts Prompts for a trailing stop, a trading-hours filter and compile errors. Read the guide

Test Your Forex Bot and Keep It Running

Past prices first, then prices the robot has never seen, then a month on live quotes. A test describes the past and promises nothing about the future.

  1. A 15-minute backtest Run the robot on past prices in the Strategy Tester. Read the guide
  2. Profit factor in the report Which report numbers matter and what good values look like. Coming soon
  3. Walk forward optimisation Optimise on one period, then check the settings on the next. Read the guide
  4. Forward testing: a 30-day plan Three weeks on demo, then a week on a cent account. Read the guide
  5. MT5 VPS for a robot Keep MetaTrader 5 and the robot running with your PC off. Read the guide
  6. Cent account

    Real trades in small size for the robot’s first live week.

    See the cent account
  7. VPS at RoboForex

    Free with equity above 300 USD, bonuses excluded, and 3 standard lots a month on instruments other than CFDs. Otherwise 5 USD a month.

    Get a VPS

Forex Trading Bot FAQ

Do forex trading bots work?
A bot can work, and no bot is assured of profit. It follows its rules exactly, so it works as well as those rules. A seller’s backtest shows only the past. Before real money goes in, check the MQL5 Market product page for a live signal and check that the robot uses a Stop Loss. Then run a walk forward test and forward test it for a month on demo and cent accounts.
Which strategies do forex robots use?
Most robots run one of five kinds of logic: trend following, mean reversion, breakout, scalping, or grid and martingale. Grid and martingale robots add orders or raise the lot after a loss, so the position can grow fast against you. The guide to what a trading robot is compares the types, and the guide to automated trading strategies turns one into rules.
How much does a forex trading bot cost?
You can start without paying for software. MetaTrader 5 comes with sample robots such as MACD Sample, the MQL5 Code Base has free source code, and the MQL5 Market has free robots next to paid and rented ones, priced by the seller. A paid robot there has a free demo you can run in the Strategy Tester first. A RoboForex VPS costs nothing with equity above 300 USD, bonuses excluded, and 3 standard lots a month on instruments other than CFDs, otherwise 5 USD a month.
How do you set up a demo account for a forex robot?
Open a demo account at RoboForex, install MetaTrader 5 and log in with the demo details. Switch on the Algo Trading button, then attach the robot to a chart. The robot trades virtual money on live quotes.
Can you run an MT4 robot in MetaTrader 5?
Not as it is. MQL4 and MQL5 are different languages, so code written for MetaTrader 4 has to be converted to MQL5 before it compiles and runs in MetaTrader 5. Ask the developer for an MT5 version, or rewrite the code in MQL5.
Can you run a forex trading bot on a phone?
The robot runs in MetaTrader 5 on a computer or on a VPS. From a phone you follow its trades in the MetaTrader 5 app logged in to the same account, or connect to the VPS with a remote desktop app.
What is the best forex trading bot?
There is no single best bot. A robot that suits one market, timeframe and risk level can lose on another, so judge a candidate by your own tests and treat any promise of fixed returns as a warning sign.
Does RoboForex provide forex trading bots?
No. RoboForex does not develop or sell trading robots. You can use Expert Advisors from third-party providers on RoboForex accounts, together with MetaTrader 5, a demo account, a cent account and a VPS to keep them running.

Run Your First Robot on a RoboForex Demo Account

Open a demo account, log in to MetaTrader 5 and attach the sample robot. It trades virtual money on live quotes, so you watch a robot at work before any real deposit.

Open a demo account
Any information provided in articles on this website is based solely on the personal opinions of the authors. These articles should not be construed as trading recommendations or a call to action. The authors and RoboForex accept no responsibility for the results of any trades made on the basis of these recommendations and reviews. Past performance is not indicative of future results. Trading stocks and CFDs involves a high risk of capital loss.