Cookie Policy

    

Articles

# How to Set Up a Trading Bot on MetaTrader 5 Using IC Markets: A Beginner's Step-by-Step Guide

 

Trading bots, also known as Expert Advisors (EAs) in MetaTrader 5 (MT5), automate your forex trading strategies by executing trades based on predefined rules. They remove emotional decision-making and can operate 24/7, potentially increasing efficiency. However, trading involves significant risk of loss, and bots do not guarantee profits—always use risk management and start with a demo account. This guide focuses on setting up an EA using MT5 with IC Markets, a popular broker known for low spreads and fast execution.

 

## Prerequisites

Before starting, ensure you have:

- A stable internet connection and a computer (Windows, macOS, or Linux via Wine).

- Basic knowledge of forex trading.

- Funds ready for deposit (minimum $200 for live accounts).

 

## Step 1: Open an Account with IC Markets

IC Markets offers demo and live accounts compatible with MT5. Start with a demo to practice.

 

1. Visit the IC Markets website using this [referral link](https://icmarkets.com/?camp=87070) and click "Start Trading" or "Open an Account."

2. Fill in your personal details (full name, email, phone) and proceed.

3. Select account type (individual, joint, or entity) and provide additional info.

4. Choose MT5 as your platform, select account type (e.g., Standard or Raw Spread), and base currency.

5. Review details, set a security question, agree to terms, and submit.

6. Check your email for a verification link, set a password, and access your client area.

7. For live trading, complete verification: Provide employment/financial info, take a knowledge quiz, and upload ID/proof of residence.

8. Fund your account via Visa, Mastercard, e-wallets (e.g., PayPal, Skrill), or wire transfer (minimum $200).

 

Once verified, you'll receive your login ID, password, and server details.

 

## Step 2: Download and Install MetaTrader 5

1. Log in to your IC Markets client area.

2. Navigate to the "Platforms" section and download the MT5 installer for your OS (Windows/Mac).

3. Run the installer, follow the prompts, and complete setup. Launch MT5.

 

## Step 3: Log In to MT5 with Your IC Markets Account

Use the desktop version for full EA functionality (mobile is limited).

 

1. Open MT5.

2. Go to **File > Open an Account** (or Login to Trade Account).

3. Search for "ICMarketsAU" (or your region, e.g., ICMarketsSC for global) and select the live server (e.g., ICMarketsAU-Live).

4. Choose "Login to an existing account."

5. Enter your Login ID, Password, and select the server.

6. Click "Finish." You'll be prompted to change your password on first login—follow the steps.

 

Your account balance and charts will load. Switch to demo if practicing.

 

## Step 4: Obtain an Expert Advisor (EA)

EAs are .ex5 files containing your bot's code.

- Download free/paid EAs from the MT5 Market (inside MT5: **Tools > Market**) or trusted sources like MQL5.com.

- For custom bots, use MQL5 language in MetaEditor (built into MT5).

- Avoid unverified EAs to prevent scams or malware.

 

Save the .ex5 file to your computer.

 

## Step 5: Install the EA in MT5

1. In MT5, go to **File > Open Data Folder**.

2. Navigate to **MQL5 > Experts**.

3. Copy the .ex5 file into this folder.

4. Restart MT5 or right-click **Expert Advisors** in the Navigator panel (Ctrl+N to open) and select **Refresh**.

5. The EA should appear under Expert Advisors in Navigator.

 

## Step 6: Attach the EA to a Chart and Configure It

1. Open a chart for your desired pair (e.g., EUR/USD) via **Market Watch** (Ctrl+M).

2. Drag the EA from Navigator onto the chart, or right-click it and select **Attach to Chart**.

3. In the settings window:

   - **Inputs** tab: Adjust parameters like lot size, stop-loss, take-profit.

   - **Common** tab: Enable "Allow live trading" and set optimization if needed.

4. Click **OK**. A smiling face icon in the chart's top-right confirms attachment.

 

## Step 7: Enable Auto Trading

1. Click the **AutoTrading** button in the toolbar (it turns green when active).

2. Go to **Tools > Options > Expert Advisors** and check "Allow automated trading" and "Allow DLL imports" (if required by the EA).

3. Monitor the **Experts** tab in the Terminal (Ctrl+T) for logs—no errors means it's running.

 

## Step 8: Test the EA Before Going Live

Always test to avoid losses.

 

### Backtesting

1. Go to **View > Strategy Tester** (Ctrl+R).

2. Select your EA, symbol, timeframe, and date range.

3. Choose "Every tick" for accuracy, set initial deposit, and click **Start**.

4. Review results: Profit factor, drawdown, trades. Optimize parameters if needed.

 

### Forward Testing

Run on a demo account for 1-2 weeks under live conditions to check real-market performance.

 

## Step 9: Deploy on a Live Account

Once satisfied:

1. Switch to your live account in MT5.

2. Attach and enable the EA as in Steps 6-7.

3. Start with small lot sizes (e.g., 0.01) and monitor closely.

4. Use a VPS for 24/7 operation to avoid interruptions.

 

## Step 10: Setting Up a VPS for 24/7 Trading

A Virtual Private Server (VPS) is essential for running your MT5 bot uninterrupted, even when your home PC is off. It provides low-latency connections (under 1ms to broker servers), high uptime (99.99%), and remote access via RDP. Choose a VPS near IC Markets' Equinix NY4 data center for minimal delays.

 

### IC Markets Free VPS

Qualifying IC Markets clients can get a free VPS with ultra-low latency and pre-configured for MT5. Requirements include a minimum monthly trading volume of 10 lots (Standard account) or 5 lots (Raw Spread), plus a $200 deposit for trial access. Sign up via your client area or [this page](https://www.icmarkets.com/global/en/forex-trading-tools/virtual-private-server).

 

### Recommended Third-Party VPS Providers

If you don't meet IC Markets' criteria, consider these top-rated options optimized for forex bots:

- **ForexVPS.net**: Forex-specific hosting with MT5 pre-installed, 100% uptime guarantee, and plans starting at $28/month. Ideal for automated strategies. [Visit ForexVPS.net](https://www.forexvps.net/)

- **Trading FX VPS**: Low-latency servers in major hubs, MT5 support, and pricing from $25/month with 99.99% uptime. [Visit Trading FX VPS](https://tradingfxvps.com/)

- **Kamatera**: Flexible cloud VPS with global data centers, scalable resources, and affordable entry at $4/month—great for beginners testing bots. [Visit Kamatera](https://www.kamatera.com/)

 

To set up: After signup, connect via Remote Desktop, download/install MT5, log in with your IC Markets details, and deploy your EA. Test on the VPS demo first.

 

## Tips and Warnings

- **Risk Management**: Never risk more than 1-2% per trade. Use stop-losses.

- **Monitoring**: Check the Journal/Experts tabs daily for issues, and review VPS performance metrics.

- **Costs**: IC Markets charges spreads/commissions; factor them into tests. VPS adds $20-50/month unless free.

- **Regulations**: Ensure compliance with your region's rules.

- Trading bots can amplify losses in volatile markets—educate yourself and consider professional advice.

 

By following these steps, you'll have a trading bot up and running on MT5 with IC Markets. Start small, learn continuously, and trade responsibly! If you encounter issues, refer to IC Markets support or MT5 help.