How to update an MT5 EA without losing your settings
Updated6 min read
MetaTrader 5InstallLicensing
Decide about open positions, save your inputs and take the EA off its chart, replace the program file, reload and check your preset, then re-run your backtest before it trades.
- A new version replaces one file. Your presets, your chart profile and your open positions stay where they were, and each needs checking against the new file.
- If the seller numbers each release, the Common tab shows which version is attached. Re-run your own backtest before the new file trades.
- A XauStack update is a free rebuild for the accounts your licence already covers. A different account is a new licence.
An update to an Expert Advisor arrives as a new .ex5 file, and installing it
takes a minute. What takes care is everything around the file: the settings you
chose, the chart it was running on, and the positions it opened. MetaTrader 5
keeps all three, but it keeps them for the old file.
What an update replaces, and what stays
The update replaces the program in MQL5/Experts, and only that. MetaTrader’s
help says the same of a Market product’s update: “The new file replaces the
previous one. Thus if need, save the old version of the file under a different
name or outside of the directory”
(MetaTrader 5 Help, Market).
A file you copy in by hand behaves the same way. Keep the old zip before you
overwrite anything.
Four things stay behind:
- Your presets.
.setfiles sit in their own folder: “Sets of input parameters are stored in the /Presets folder of the trading platform” (MetaTrader 5 Help). - Your chart. A template can store the “running Expert Advisor and its parameters”, and “All changes in open chart windows are automatically saved in the current profile” (MetaTrader 5 Help, Templates and Profiles).
- Your positions. They belong to the account, not to the file.
- Global variables, which some Expert Advisors use to remember state: they “are kept in the client terminal for 4 weeks since the last access” (MQL5 Reference).
Before you swap the file
Decide what happens to open positions. Most Expert Advisors find their own positions by magic number, the “ID of an Expert Advisor that has placed the order (designed to ensure that each Expert Advisor places its own unique number)” (MQL5 Reference). If the new version uses a different number, it will not manage what the old one opened. Ask the seller, or wait until the account is flat.
Save the inputs you are running. Open the Expert Advisor’s properties on the chart and use the Inputs tab: “You can use the ‘Save’ button to save the current set of parameters and the ‘Load’ button to load a previously saved set” (MetaTrader 5 Help).
Remove the Expert Advisor from the chart. The profile remembers it, so removing it first means nothing starts by itself on old settings while you work. Removing it closes nothing: any position it opened stays open, with only the stop loss and take profit already on it at the broker, and nothing manages it until an Expert Advisor that recognises it is running again. Do the swap with the account flat, or with positions you are ready to watch by hand.
Install it, then read the version
Close MetaTrader 5, copy the new .ex5 into MQL5/Experts, and start the
terminal again. Installing an Expert Advisor
covers the folders.
Attach it to the chart and look at the first tab before you click OK. MetaTrader’s help: “The ‘Common’ tab contains information about the application: name, version, copyright, the software developing company name … and description” (MetaTrader 5 Help). If the seller changes the version number with each release and the Common tab still shows the old one, the old file is still in the folder.
Then read the Experts tab of the Toolbox. It “contains information about the running indicators and Expert Advisor, including opening/closing of positions, modification of orders, Expert Advisor alerts and comments” (MetaTrader 5 Help, Platform Logs). An error at start-up shows here first.
Your settings after the update
Load the preset you saved, then read the Inputs tab line by line against the seller’s notes. A new version can add an input, rename one or drop one, and a preset saved from the old version was written for the old one. Where the seller ships new presets with the update, start from those. When you click OK, “the EA is re-initialized with new input parameters” (same help page).
Re-run your own backtest before it trades
A new version is new software, so your old Strategy Tester report no longer describes it. Run the same window, deposit, symbol and modelling mode you used before. The tester can “save sets of settings for various Expert Advisors in ini files” (MetaTrader 5 Help, Strategy Testing), which makes the second run a true repeat of the first.
Then compare the two reports. Differences the seller’s notes explain are what you paid for. Large ones they do not explain are a question to ask before the file goes near a funded account. If you run it on a demo first, a demo forward test gives you a method.
How a XauStack update reaches you
Our builds are compiled for your account numbers, so an update is a new build. What the site states:
- It is free, for the same accounts. A new version costs nothing: “every update we release is rebuilt for the accounts your licence already covers and appears on your order page”. The licence “includes every later version of the Product, rebuilt for those same accounts at no extra cost, for as long as it is maintained”.
- Your current build stays available while the new one compiles. The order page says so while it happens.
- It is never an account change. “Moving to a different account means buying a new licence for that account.”
- Close or take over positions first. A new build “carries its own magic number, so it does not recognise the positions the previous build opened. Close those positions — or take them over by hand — before you attach it.”
- Nothing forces the update. A delivered build cannot be revoked or changed remotely, so the one you hold keeps running on its accounts until you replace it. What an account-locked build is explains why.
- A Product taken off sale still rebuilds. Licences already issued for it “stay valid and their builds are still made”.
The download link on the order page expires, and the site does not promise an email when a version ships. Check the order page, and keep every zip you have downloaded. The free Backtest Edition on the download page is republished for each new Version, so once it shows the new one you can run the step above on it before you install anything.
Before you act on any of this
Every figure XauStack publishes comes from the MetaTrader 5 Strategy Tester, never from live trading, and no result is promised anywhere on this site. A new version changes the software, not the risk of trading gold on leverage. Read the risk disclosure before you attach an updated Expert Advisor to an account that holds money.
Read next
How to install an Expert Advisor on MetaTrader 5
Where the .ex5 file goes, how to find the MT5 data folder, where presets live, and how to attach an Expert Advisor to an XAUUSD chart without guesswork.
What an account-locked build is
Why a XauStack Expert Advisor is compiled for your MT5 login instead of unlocked by a key, what offline means, and what happens if your account changes.
Gold EA settings: four inputs and a sealed Profile
Our download ships .set presets, one per Profile, but not a folder of tunable thresholds per risk tier. What a Profile is and what four inputs you get.
How to forward test a gold EA on a demo account
A demo forward test method for a gold EA on MT5: fix the setup, log each day, then replay the same dates in the Strategy Tester and compare the trades.