What You'll Learn and Why It Matters
If you've ever lost code because your local MQL5 Storage got corrupted, or you've emailed .mq5 files back and forth with a collaborator only to merge changes manually, the new MT5 Algo Forge is about to change your workflow. Introduced in MetaTrader 5 build 5100, Algo Forge is a built-in developer hub inside MetaEditor that gives you Git-based version control, cloud-hosted repositories, and structured team collaboration — all without leaving the IDE.
I've been using it since the beta, and it's a genuine time-saver. No more "final_v3_actuallyfinal.mq5" filename nonsense. You get proper commit history with timestamps and author attribution, branching for experimental features, and the ability to roll back when your "brilliant" optimization actually makes things worse. I once accidentally deleted a working grid EA while refactoring — one git checkout and I was back in business. That alone sold me.
This guide walks you through setting up Algo Forge from scratch: connecting your MetaQuotes ID, creating or cloning a repository, committing and pushing code, and managing pull requests. You'll also learn how to migrate your existing MQL5 Storage projects into a proper Git workflow. By the end, you'll treat MetaEditor like a modern development environment, not just a code editor with a compile button.
Prerequisites
Before you start, make sure you have the following:
- MetaTrader 5 build 5100 or higher — Check your build number in MT5: Help > About. If it's older, update via Help > Check for Updates or reinstall from your broker's site. Some brokers lag behind on builds — if yours is stuck on an older version, contact support or download the latest from the MQL5 website directly. I've seen builds as old as 4900 still in use on some retail brokers.
- A MetaQuotes ID — This is your free account on the MQL5 community. If you don't have one, create it at mql5.com or directly inside MetaEditor via File > Manage Accounts. Use a real email — you'll need it for password recovery and 2FA setup. Do not use a temporary email service; MQL5 blocks some domains.
- Git installed on your system — Algo Forge uses Git under the hood. Download from git-scm.com and install with default options. On Windows, make sure "Git from the command line" is selected during setup. Also check "Use Git from Git Bash only" — you don't want Git messing with your system PATH for other tools. If you already have Git from another source (like GitHub Desktop), ensure the version is 2.20 or newer — older versions have compatibility issues with Algo Forge's authentication.
- An internet connection — Algo Forge repositories live on MQL5 cloud servers. No offline mode yet, though local commits work without internet. You only need connectivity for push/pull operations. I sometimes work on a train with no internet — I commit locally, then push when I'm back online. Works fine.
- Your MQL5 projects — If you're migrating from MQL5 Storage, have the project files locally. If starting fresh, just have an idea of what you want to build. I recommend starting with a small EA or indicator — something under 200 lines — to test the workflow before moving your main projects.
Optional but recommended: a second MetaQuotes ID for testing collaboration (create a dummy account with a different email). I use a Gmail alias ([email protected]) — it's free and easy to manage.
Step-by-Step Setup and Usage
1. Enable Algo Forge in MetaEditor
Open MetaEditor (you can launch it from MT5 by pressing F4 or via Tools > MetaQuotes Language Editor). Look for the new Algo Forge tab in the left-side panel — it's next to "Navigator" and "Toolbox". If you don't see it, go to View > Toolbars and ensure "Algo Forge" is checked. On some builds, you might need to restart MetaEditor after enabling it. I've seen cases where the tab appears but is grayed out — a restart usually fixes it.
Click the Algo Forge tab. You'll see a "Sign In" prompt. Enter your MetaQuotes ID credentials. If you have two-factor authentication enabled on your MQL5 account, you'll need to enter a verification code sent to your email or generated by an authenticator app. I use Google Authenticator — it works fine. The session stays active for about 24 hours, then you'll need to re-authenticate. There's no "remember me" toggle yet.
Once signed in, the panel shows three sections: My Repositories, Shared with Me, and Public. The first two are empty initially. The Public section shows open-source repos from other MQL5 developers — you can browse and clone them for learning. I've found some decent moving average crossover examples there, though most are basic.
2. Create Your First Repository
Click the + button at the top of the Algo Forge panel (or right-click in the "My Repositories" area and select "Create Repository"). A dialog appears:
| Field | Required | Example | Notes |
|---|---|---|---|
| Repository Name | Yes | my-grid-trading-bot | Use lowercase, hyphens, no spaces. 3-50 characters. Avoid special characters like underscores — they cause issues on some systems when cloning. |
| Description | No | A grid EA for EURUSD M15 | Shown in the repo list. Keep it short — it's not searchable like GitHub. Max 200 characters. |
| Visibility | Yes | Private | Private (only you and invited collaborators) or Public (visible to all MQL5 users). Public repos are listed on the MQL5 community site — good for portfolio, but don't expose proprietary strategies. You cannot change visibility after creation — delete and recreate if you need to switch. |
| Initialize with README | No | Checked | Creates a README.md file. Recommended for documentation. You can edit it later in MetaEditor or any text editor. If unchecked, you get an empty repo with no initial commit. |
Click "Create". The repository appears under "My Repositories". You now have a remote Git repository on MQL5's servers. The repo is empty except for the README if you chose that option. Note that the initial commit message will be "Initial commit" — you can't customize it at creation time.
3. Clone the Repository to Your Local Machine
Right-click your new repository and select "Clone Repository". A dialog asks for a local folder. By default, it suggests something like C:\Users\YourName\AppData\Roaming\MetaQuotes\Terminal\Common\AlgoForge\my-grid-trading-bot. You can change this, but I recommend keeping it inside the AlgoForge folder to stay organized. If you change it, Git will still work, but MetaEditor's file tree might not show it automatically — you'd need to add it manually via File > Open Folder.
Click "Clone". MetaEditor runs git clone in the background. You'll see progress in the "Toolbox > Algo Forge" output tab. Once done, the local folder appears in the "Navigator" panel under a new "Algo Forge" branch. You'll also see a small Git icon on the status bar (bottom right) showing the current branch — initially "main".
One thing that caught me: if the clone fails with "error: RPC failed", it's usually a network issue. Try again after a few seconds. If it persists, check your firewall — some corporate networks block Git's smart HTTP protocol. On a home network, try disabling your VPN temporarily. I've also seen this error when the repository name contains uppercase letters — stick to lowercase.
4. Add Your Code and Make Your First Commit
Now copy or create your MQL5 files inside the cloned folder. For example, create a new Expert Advisor: right-click the folder in Navigator, select "New File", choose "Expert Advisor", name it "MyGridBot.mq5". MetaEditor creates the file with a template. I usually delete the template boilerplate and start fresh — it's too generic and has unnecessary comments like "--- indicator settings ---" that just clutter the code.
Write your code, then look at the Algo Forge panel. Files that have changed appear with a yellow dot next to them. To stage changes:
- Right-click the file in Algo Forge and select "Stage" (or press Ctrl+Shift+S).
- To stage all changes, click the "Stage All" button (looks like a plus sign) at the top of the panel.
Write a commit message in the text box at the bottom of the Algo Forge panel — something descriptive like "Initial EA structure with entry logic". Then click "Commit" (checkmark icon). This creates a local commit. You can make multiple commits before pushing. I typically commit every time I finish a logical feature — like "added trailing stop" or "fixed order expiration bug". Avoid vague messages like "update" or "fix" — they're useless when you're looking at the history six months later.
Here's a quick example of what your commit history might look like after a few sessions:
commit a1b2c3d4e5f6...
Author: YourName
Date: Mon Mar 4 14:23:45 2024 +0300
Fixed order send error when stop loss is below market
commit f6e5d4c3b2a1...
Author: YourName
Date: Sun Mar 3 09:12:30 2024 +0300
Added trailing stop logic with ATR multiplier
commit 9a8b7c6d5e4f...
Author: YourName
Date: Sat Mar 2 18:45:00 2024 +0300
Initial EA structure with entry logic
5. Push to Remote
To share your code or back it up to the cloud, click the "Push" button (an upward arrow) in the Algo Forge panel. MetaEditor runs git push origin main. If this is your first push, Git may ask for your MetaQuotes ID password again (cached for the session). If you're using 2FA, you'll need to enter the app-generated code here as well. The credentials are cached for the duration of the MetaEditor session — closing and reopening MetaEditor will require re-authentication.
After a successful push, the remote repository on MQL5.com is updated. You can verify by logging into your MQL5 account in a browser and navigating to Community > Algo Forge. You'll see your repo listed with the latest commit message and timestamp. The web interface is basic — no file browser, just a list of commits. You can't view file contents online yet.
If the push fails with "non-fast-forward" error, it means someone else pushed changes you don't have locally. Pull first (see tip below), resolve any conflicts, then push again. If you get "authentication failed", double-check your MetaQuotes ID password — it's case-sensitive.
6. Invite Collaborators and Manage Pull Requests
To work with a team, you need to add collaborators. In the Algo Forge panel, right-click your repository and select "Manage Collaborators". A dialog lets you search for other MetaQuotes IDs by username or email. Add them with "Read" or "Write" permissions. Write access allows pushing directly to the main branch; Read-only users can clone and submit pull requests. You can add up to 10 collaborators per repository — a hard limit that MQL5 hasn't documented well.
For pull requests (the safer workflow — I never allow direct pushes to main in production):
- Your collaborator clones the repository, creates a new branch (right-click > "Create Branch"), makes changes, and pushes that branch. Branch names like "feature/risk-management" or "bugfix/order-expiry" are easy to identify.






