MT5 MQL5 Cloud Storage: Backup Code & Projects Guide

Learn how to use MQL5 cloud storage in MetaEditor to backup EA code, sync projects across multiple computers, and restore previous versions. Step-by-step setup.

mt5-mql5-cloud-storage-backup-code-projects-guide

Why You Need Cloud Storage for Your MQL5 Code

If you've ever lost hours of EA development because your laptop hard drive died, or you've emailed yourself .mq5 files between your desktop and laptop, you already know the pain. MetaTrader 5 includes a native cloud storage feature inside MetaEditor that most traders never touch. It's not Git — it's simpler, more integrated, and it works directly from the code editor you already use. I've seen too many developers lose weeks of work because they relied on local-only copies. The cloud storage feature costs nothing (for the free tier) and takes about five minutes to set up.

This guide walks you through setting up MQL5 cloud storage, uploading your projects, restoring older versions, and syncing across machines. By the end you'll have a reliable backup workflow that saves you from losing work permanently. I'll also cover the gotchas I've hit over two years of daily use — things the official documentation doesn't tell you.

What You'll Need Before Starting

You need a few things in place before the cloud storage feature works properly. Don't skip these prerequisites — I've wasted time troubleshooting only to realize I wasn't logged in correctly.

  • A live MQL5 Community account — this is the same login you use for the MQL5 Market or Code Base. If you don't have one, register at mql5.com. It's free and takes two minutes.
  • MetaTrader 5 build 2000 or newer — older builds don't include the cloud storage integration. Check your build number under Help > About. If you're on build 1900 or below, download the latest installer from mql5.com and reinstall. Your existing settings and indicators won't be affected.
  • An active internet connection — obviously, but the sync is real-time so a flaky connection can cause upload failures. I've had uploads hang for 30 seconds on a weak Wi-Fi signal before timing out.
  • At least one MQL5 project — an Expert Advisor, custom indicator, or script you want to back up. The feature works with .mq5 and .mqh files inside the MetaEditor project structure. It won't back up .ex5 binaries, test reports, or custom DLLs.

One detail most guides miss: you need to be logged into your MQL5 account inside MetaTrader 5, not just on the website. Open MT5, go to Tools > Options > Community, and enter your credentials there. If the status shows "Disconnected," click Connect. I've seen people assume they're logged in because they can browse the Market — but that uses a separate session. The community login is what enables cloud storage.

Step-by-Step: Setting Up MQL5 Cloud Storage in MetaEditor

Let's get this working. I'll show you the exact menus and clicks, not vague instructions. Do these steps in order — jumping ahead causes the grayed-out menu problem I'll cover later.

Step 1: Log Into Your MQL5 Account in MetaTrader 5

Open MT5. Press Ctrl+O to open Options, or navigate Tools > Options. Click the Community tab. Enter your MQL5.com username and password. Click OK. You should see "Connected" next to your username in the status bar at the bottom of the MT5 window. If it says "Disconnected," double-check your credentials and internet connection. One tip: if you have two-factor authentication enabled on your MQL5 account, you'll need to generate an app password from your account settings on mql5.com — the standard password won't work through MT5.

Step 2: Open Your Project in MetaEditor

Press F4 to launch MetaEditor. If you have an existing project, open it via File > Open Project or press Ctrl+O. If you're starting fresh, create a new Expert Advisor: File > New > Expert Advisor > Next, name it (I'll use "MyTrendEA" for this example), and finish the wizard. You'll see your project files in the Navigator panel on the left side. The project root is the folder icon with your project name — right-click that, not individual files.

Step 3: Enable Cloud Storage for the Project

Right-click the project root in the Navigator panel. Select "Cloud Storage" from the context menu. A submenu appears with options: Enable, Disable, Upload, Download, and Show Versions. Click Enable.

MetaEditor will prompt you to confirm. Click Yes. The project folder icon now shows a small cloud overlay — that's your visual confirmation it's active. If you don't see the cloud overlay, try collapsing and expanding the project tree. If it still doesn't appear, you may not be logged in (go back to Step 1).

Step 4: Upload Your Current Code

With cloud storage enabled, right-click the project again, go to Cloud Storage > Upload. MetaEditor uploads all .mq5 and .mqh files in the project to the MQL5 servers. You'll see a progress bar in the bottom-right corner. For a typical EA with a few files, this takes under five seconds. When it's done, MetaEditor shows a small dialog: "Upload complete."

Here's where you can add a comment — don't skip it. A dialog box appears asking for a comment (up to 200 characters). Type something descriptive like "Initial upload before adding trailing stop logic" rather than "v1" or "backup." Trust me, you'll thank yourself when you're looking at version history six months later.

After upload completes, the cloud icon turns blue. That means your code is stored remotely. If the icon stays gray or shows a red X, the upload failed — check your internet connection and try again.

Step 5: Verify the Backup Exists

Right-click the project, Cloud Storage > Show Versions. A dialog opens listing every upload with a timestamp, file size, and the comment you entered. You can expand each version to see individual file changes. This is your version history — more on that later. For now, just confirm you see at least one entry with today's date and your comment.

Restoring Code from Cloud Storage

Now the real test: can you get your code back? Here's how to restore on the same machine or a different one. I've done this dozens of times after accidentally deleting files or when switching between my desktop and laptop.

Restoring on the Same Computer

If you accidentally deleted a file or broke your code beyond repair, right-click the project in MetaEditor, go to Cloud Storage > Show Versions. Select the version you want (usually the most recent). Click Restore. MetaEditor overwrites the local files with the cloud version. A confirmation dialog lists the files that will change — review them, then click OK.

Important: Restore replaces local files without warning. Always back up your current local version before restoring. Quick trick: right-click the project, select "Open Folder in Explorer," copy the entire folder elsewhere, then restore. If the restored version isn't what you wanted, paste your backup back. I learned this the hard way after restoring a week-old version over my current work.

Restoring on a Different Computer

This is where cloud storage shines. Install MT5 on your second machine, log into the same MQL5 account in the Community tab, and launch MetaEditor. Create a new project with the exact same name as your original — case-sensitive. Right-click it, Cloud Storage > Enable, then Cloud Storage > Download. MetaEditor pulls all files from the cloud. You may need to compile (F7) after download to generate the .ex5 file.

A common gotcha: if the project name differs by even one character (e.g., "MyTrendEA" vs "mytrendea"), the cloud storage won't recognize it. Use identical names and folder structures. Also, make sure the project type matches — if you created an Expert Advisor on your desktop, create an Expert Advisor on the laptop, not a custom indicator.

Understanding Versioning and Storage Limits

MQL5 cloud storage isn't infinite. Here's what you get with the free and paid tiers. I've been on the free tier for two years and haven't hit the limit, but your mileage may vary depending on how many projects you back up.

FeatureFree TierPaid Tier (Premium)
Storage quota100 MB1 GB
Max file size per upload10 MB50 MB
Version history retention30 days1 year
Number of projectsUnlimited (within quota)Unlimited
CostFree~$15/month

For most developers, 100 MB is plenty — a typical EA with include files and libraries runs under 2 MB. Version history keeps the last 30 days of changes on the free plan, which is enough for rolling back a bad edit. If you need longer retention, MQL5 Premium costs about $15/month and includes other perks like faster market access and priority support. I've never needed Premium for cloud storage alone, but if you're working on multiple large projects (say, 10+ EAs with heavy libraries), the 1 GB quota gives breathing room.

One important detail: version history counts each upload as a new version, but old versions are pruned after 30 days (free) or 1 year (Premium). If you upload 50 times in a day, only the most recent versions within the retention window are kept. The system deletes the oldest versions first when you exceed the quota or retention period. I've tested this by uploading 20 versions in one hour — the next day, only the last 10 were retained because of the 30-day window starting from the upload date.

Tips and Best Practices from Real Use

I've been using this feature for about two years across three machines (desktop, laptop, and a VPS for running EAs). Here's what I've learned the hard way:

Upload Before Major Edits

Get in the habit of uploading a clean version before you start hacking at your code. Right-click > Cloud Storage > Upload takes two seconds. If you break something, you restore to that known-good state instead of hunting through version history for the last working build. I do this every time I'm about to add a new feature — it's saved me at least five times when I accidentally introduced an infinite loop or broke the entry logic.

Use Descriptive Comments on Uploads

When you upload, MetaEditor lets you add a comment. Don't skip this. "Added trailing stop logic" is infinitely more useful than "v3" when you're scrolling through 20 versions a month later. The comment field accepts up to 200 characters. Here's a real example from my own history: "Fixed slippage handling in OrderSend, added error logging" versus "update" — guess which one helped me find the right version when debugging a live trade issue?

Sync Before Compiling on a New Machine

If you switch computers, always download the cloud version before you compile. MetaEditor sometimes caches outdated .ex5 files in the \Experts or \Indicators folders. Downloading first ensures your compiled binary matches the source. I've deployed wrong versions to live accounts because I forgot this step — don't be me. The sequence should be: open project, Cloud Storage > Download, then F7 to compile, then attach to chart.

Exclude Large Binary Files

Cloud storage only uploads .mq5 and .mqh files by default. That's good — you don't want .ex5 binaries, test reports, or log files eating your quota. If you have custom DLLs or data files (like CSV configuration files), store those separately. The cloud storage won't include them, which can surprise you if your EA depends on external resources. I once spent an hour wondering why my EA wouldn't run on a second computer — turns out it needed a custom DLL that wasn't backed up. Now I keep a separate archive of DLLs and data files in a cloud drive like Dropbox.

Regular Upload Schedule

Set a recurring calendar reminder to upload at the end of each coding session. I use a simple rule: upload before I close MetaEditor for the day. If you code sporadically, make it a habit to upload every time you make a meaningful change. There's no automatic sync, so it's all manual. I've forgotten to upload after a long coding session more times than I'd like — and regretted it when my laptop crashed the next day.

Common Mistakes and Troubleshooting

Here are the problems I've seen most often in forums and from clients. These are the issues that can waste hours if you don't know what to look for.

"Cloud Storage Option Is Grayed Out"

This happens when you're not logged into your MQL5 account inside MT5. Go to Tools > Options > Community and verify the connection. If it's connected but still grayed out, restart MetaEditor. If that fails, your MT5 build might be too old — update to the latest version from the mql5.com download page. I

Frequently Asked Questions

Does MQL5 cloud storage work with MT4?

No. This feature is exclusive to MetaTrader 5 and MetaEditor. MT4 users need third-party solutions like Git, Dropbox, or manual backups.

Can I share my cloud-stored code with another developer?

Not directly. The storage is tied to your MQL5 account. To share, you'd need to give the other person your login credentials (not recommended) or export the project manually and send the files.

What happens if I exceed the 100 MB free quota?

Uploads fail with a quota exceeded error. You can delete old versions from the Show Versions dialog to free space, or upgrade to MQL5 Premium for 1 GB. Check your usage in MetaEditor under Help > About > Storage.

Does cloud storage work offline?

No. You need an internet connection to upload, download, or view versions. But your local files remain editable offline — you just can't sync until you reconnect.

Community

Clap for the article and open comments only when you want to read them.

0 claps0 comments

Related articles