$ £ ¥
¥ £ $

Change Data Folder Location with MT4 Portable

MT4 portable is a great way to manage your MT4 Installation and to change the data folder location.

MetaTrader 4 has working folder where all the indicators, EAs, history data and so on are saved.

There are some cases where you may need to move this folder from the default location. In this article you will see how to run MT4 in portable mode and how to change the data folder location.


MT4 Data Folder

When you install MetaTrader you can select where to install the software, usually C:Program Files (x86).

By default the first time you run MetaTrader it creates a working folder in the user profile to save their files, this folder is called data folder.

The MT4 data folder is the folder where MetaTrader saves its working data. The data folder includes:

  • Profiles
  • Templates
  • Cached account credentials
  • Historical data
  • Indicators
  • Expert advisors
  • Logs
  • Scripts
  • Sounds
  • Work files and images

MT4 Data Folder Location

The default location of the the MT4 data folder is C:UsersUSERAppDataRoamingMetaQuotesTerminalHASH.

Where USER is the user currently logged in and HASH is a sequence of alphanumeric characters.

For example, one of my MetaTrader platforms has the working folder as in the screenshot.

Sample MetaTrader 4 Data Folder Location

You can check the location of your data folder by clicking File→Open Data Folder in your MetaTrader's menu.

MT4-Data-Folder-Location-2

Why Change Data Folder Location?

In some cases, you may need to move the data folder to another location. A very good example for this is when you need to store data for backtesting.

We already saw how to download accurate historical data in the article: How to get 99.9% Modeling Quality Backtesting in MetaTrader 4.

Tick data can be very heavy and if you download tick data for several years for multiple currency pairs, you could easily get many gigabytes of data.

If your hard disk doesn't have enough space to store all the data, you will need to move the data folder to another location on your computer.

Another reason, although not that frequent, could be for performance.

Maybe you have a fast hard disk installed and you want to run MetaTrader and its files from this disk. You can move all the data there and make MetaTrader run faster.

To recap, you can change the MT4 data folder location for the following reasons:

  • Backup - to save the data in a location different from the default one.
  • Performance - you want to move the data to a faster storage.
  • Storage - you need more space than what is available on the default data folder hosting disk.
  • Portability - you want to run your installation on another device.

MT4 Portable Mode

MT4 portable mode is a great way of running your MT4 Installation.

It gives a flexibility that is not available using the default settings.

MT4 Portable mode allow you to have the MT4 client and data folder in the same folder.

MT4 Portable mode is useful for the following reasons:

  • You can back up your MT4 installation from a single folder. Backup — Resolved!
  • The software can be moved to a different and faster disk. Performance — Resolved!
  • You can move the terminal to a disk with more storage. Storage — Resolved!
  • The software can be copied and run even from an external device like a USB disk or a USB stick. Portability — Resolved!

How to Run MT4 in Portable Mode

You now know what the data folder is, what it contains, and why you may want to move it to another location.

There are a few ways to use a different location for the data folder, but I am going to show you just my favorite.

If you don't know already, the very first thing you need to understand is that the MetaTrader installation folder can be moved to any location and MetaTrader will still work.

MetaTrader is not limited to work in its original installation folder.

In short, the process is:

  1. Move the installation folder to your preferred location.
  2. Configure the /Portable parameter in the MT4 shortcut.
  3. Run MetaTrader.

Step 1. Move the installation folder to your preferred location

In my case, I moved to the B drive and renamed it to MetaTrader 4 - BackTesting.

MetaTrader Folder in New Location

Step 2. Configure /Portable parameter in the MT4 shortcut

MetaTrader has this awesome option to launch the terminal as a portable software.

This will tell the program to run entirely from the executable folder.

In my case everything will run from MetaTrader 4 - BackTesting and this will also be the data folder.

To run MetaTrader in portable mode, add the argument to the shortcut.

Modifying MT4 Shortcut to Add /Portable Parameter

Step 3. Run MetaTrader

Easily done! When you run MetaTrader with the /Portable argument, check the data folder and this will be the actual MetaTrader folder.

NOTE: Remember to move all your files from your original data folder to the new one if you already had profiles, EAs, indicators and so on.

Did you know? The same method works with MetaTrader 5 platform — you can find your MT5 data folder location the same way and you can also copy the program folder elsewhere to run it in the MT5 portable mode.


Conclusion

In this article you learned what the data folder is and how to use the MT4 portable mode to move it to another location if you need to. If you have a huge amount of data for backtesting you will probably need this. If you didn't know already, now you can run MetaTrader in portable mode.

If you want to get news of the most recent updates to our guides or anything else related to Forex trading, you can subscribe to our monthly newsletter.