Skip to content

Step 3 · about 15 minutes

How to set up MetaTrader 5 for automated trading

Download MetaTrader 5 from your broker's website, install it and log in with your demo account credentials. Then enable the Algo Trading button on the toolbar and add https://gritmarkets.com under Tools, Options, Expert Advisors, Allow WebRequest. Those two settings are what let an Expert Advisor trade and verify its licence.

MetaTrader 5 is the trading platform, often called the terminal, where charts are drawn, orders are sent and Expert Advisors run. It is made by a company called MetaQuotes, but you should download it from your own broker rather than from an app store, because the mobile and store builds are limited versions that cannot run EAs at all. This guide takes you from download to a fully prepared terminal on your demo account from step one, including the two settings that beginners most often miss: the Algo Trading switch and the WebRequest whitelist. Do all of this on the computer, or the VPS, where the EA will actually live.

  1. Download MT5 from your broker's website

    Log in to your broker's client portal, find the downloads or platforms section, and download the MetaTrader 5 desktop installer for Windows. The broker's build comes pre-loaded with its server names, which makes logging in easier. Avoid the Microsoft Store, Apple, and Google Play versions: they are cut-down builds that cannot load Expert Advisors, and this is a nominative mention of those stores only, not a recommendation.

    broker-mt5-download-page.webp
    1. MetaTrader 5 desktop download button
    2. Mobile and web versions to ignore for EA use
    Callouts for step 1 screenshot
  2. Run the installer and open the terminal

    Open the downloaded file, accept the licence agreement and let the installer run; the default settings are fine. When it finishes, MetaTrader 5 opens by itself, usually showing a demo chart and a sign-up prompt from MetaQuotes, which you can close. If you are setting up on a VPS, do this inside the Remote Desktop window so the platform lives on the machine that stays switched on.

    mt5-windows-installer-wizard.webp
    1. Licence agreement acceptance
    2. Install button with default settings
    Callouts for step 2 screenshot
  3. Log in with your demo credentials

    Go to File, then Login to Trade Account, and enter the account number and password from the confirmation email you saved in step one. Pick the exact server name from that email in the dropdown; brokers run many servers and demo accounts only exist on their own one. When the connection bars in the bottom-right corner turn green and show numbers, you are connected to your demo account.

    mt5-login-demo-account-dialog.webp
    1. Account number from the broker email
    2. Exact demo server name in the dropdown
    3. Green connection indicator after login
    Callouts for step 3 screenshot
  4. Take a two-minute tour of the terminal

    Four panels matter. Market Watch, on the left, lists currency pairs and their live prices. The chart window in the centre shows price history for one pair. The Navigator panel lists your accounts and, importantly, your installed Expert Advisors. The Toolbox along the bottom shows your open trades, account history, and two tabs you will use constantly: Experts, where EAs write their messages, and Journal, where the terminal logs everything it does.

    mt5-terminal-layout-overview.webp
    1. Market Watch with live prices
    2. Navigator listing Expert Advisors
    3. Toolbox with Experts and Journal tabs
    Callouts for step 4 screenshot
  5. Enable the Algo Trading button

    On the main toolbar is a button labelled Algo Trading. This is the master switch for all automated trading in the terminal: when its icon is red, no EA anywhere in the platform is allowed to trade, no matter how it is configured. Click it once so the icon turns green. Remember where it is, because clicking it again is also the fastest way to pause every EA at once.

    mt5-algo-trading-button-enabled.webp
    1. Algo Trading button in the green, enabled state
    2. Toolbar position for quick access
    Callouts for step 5 screenshot
  6. Add https://gritmarkets.com to the WebRequest whitelist

    Go to Tools, then Options, then the Expert Advisors tab. Tick Allow WebRequest for listed URL, click the add line and type https://gritmarkets.com exactly, character for character, with the https and no trailing slash or extra spaces. MT5 blocks EAs from contacting the internet unless the address is on this list, and the Grit Markets EA contacts that address to validate your licence. If the URL is missing or mistyped, the EA will load but refuse to run.

    mt5-enable-webrequest-whitelist.webp
    1. Allow WebRequest for listed URL ticked
    2. https://gritmarkets.com entered exactly
    3. OK button to save the settings
    Callouts for step 6 screenshot
  7. Confirm the setup in the Journal tab

    Open the Toolbox at the bottom of the terminal and click the Journal tab. You should see lines confirming a successful login to your demo server and no red error messages. This tab and its neighbour, Experts, are where you will look first whenever anything seems wrong, so it is worth knowing they exist before you install anything. Your terminal is now ready for step four.

    mt5-journal-connection-log.webp
    1. Journal tab selected in the Toolbox
    2. Successful authorisation line for the demo account
    Callouts for step 7 screenshot

Common problems.

Why does MT5 say invalid account or no connection when I log in?

Nine times out of ten the server name is wrong. Brokers run separate servers for demo and live accounts, and your demo login only works on the exact server named in your confirmation email. Reopen File, Login to Trade Account, retype the account number and password by hand rather than pasting, and select that precise server from the dropdown. If it still fails, the demo may have expired; brokers close inactive demos after a few weeks and a new one takes minutes to open.

I downloaded MT5 from the Microsoft Store and cannot find Expert Advisor options. Why?

The app store builds of MetaTrader 5 are limited versions that cannot run Expert Advisors, so the settings genuinely are not there. Uninstall that copy, log in to your broker's client portal and download the full desktop installer from its platforms page instead. After installing the broker's build, the Expert Advisors tab appears under Tools, Options, and the Algo Trading button appears on the toolbar as this guide describes.

The Algo Trading button keeps turning red or will not stay enabled. What is wrong?

First check nothing is disabling it for you: some brokers' investor passwords, read-only logins meant for viewing, cannot trade, so make sure you logged in with the main password. Next open Tools, Options, Expert Advisors and confirm Allow algorithmic trading is ticked there too, because that setting overrides the toolbar button. Finally, restarting the terminal after changing options clears most oddities. The button should stay green until you click it yourself.

Do I have to add the WebRequest URL exactly, or is the domain enough?

Add it exactly as written: https://gritmarkets.com. MetaTrader 5 matches whitelist entries very literally, so a version without https, with a www prefix the EA does not use, with a trailing slash or with a stray space counts as a different address and the request is blocked. If the EA later reports that it cannot validate its licence, this list is the first place to check. Retype the entry rather than trusting a paste.