Home / Blog / How to load a .set file in MT5 and save your own settings

How to load a .set file in MT5 and save your own settings

In short: Attach the EA to a chart, open the Inputs tab, click Load, pick the .set file and press OK.

MT5 settings file: .set Attach the EA, open Inputs, click Load, pick the .set file and press OK
.set Attach the EA, open Inputs, click Load, pick the .set file and press OK

A .set file is a plain-text list of one Expert Advisor's input values. To load one in MetaTrader 5, attach the EA to a chart, open the Inputs tab, click Load, pick the file and press OK. To save your own values, click Save on the same tab. Sets saved from a chart go to the MQL5\Presets folder.

Below: where the files live, how a .set differs from a template and a profile, the Strategy Tester, and a checklist for values that "went back". Facts come from MetaTrader 5 Help and the MQL5 Reference, retrieved 8 October 2026. Terms: grid EA glossary.

On this page (11)

What is a .set file?

A .set file is a plain-text list of one Expert Advisor's input values, such as lot size, take-profit and trading hours. It holds no code and does nothing without the matching .ex5 file.

Think of an EA as a machine with dials. A .set file is a card with the dial positions written on it: lot size, take-profit, trading hours. The card is not the machine: it has no code and does nothing without the matching .ex5 file.

Inside, it is text, one input per line as name=value. A sample file from the MetaTrader 5 install we checked, MACD Sample.set, looks like this (abridged):

; this file contains last used input parameters for testing/optimizing MACD Sample expert advisor
InpLots=0.1||0.1||0.010000||1.000000||N
InpTakeProfit=50||50||1||500||N

Lines starting with ; are comments. In this tester-style line the first number is the value for one run, the next three are an optimization range (start, step, stop), and Y or N marks whether the input is optimized. That format is read from the sample, not from the Help. The file is UTF-16 text, which Notepad opens.

Two details save trouble later. The file stores the input's variable name (InpLots), while the Inputs tab shows a label the author wrote (per the MQL5 Reference, the comment beside the declaration). And a set holds inputs only: the EA file, the Allow Algo Trading switches, the WebRequest list, the symbol, the timeframe and your login sit outside it.

How do you load a .set file on a chart, step by step?

To attach an EA and load a .set file in MT5, drag the EA from the Navigator onto the chart, open the Inputs tab, click Load, pick the file and press OK; the EA is then re-initialized with the new inputs.

  1. Open the chart the EA is meant for (its instructions name the symbol and timeframe).
  2. Press Ctrl+N for the Navigator and drag the EA from Expert Advisors onto the chart (a double-click works too). If it already runs, right-click the chart and choose Expert Advisors → Properties (F7 opens the same window).
  3. Open the Inputs tab, click Load, pick the file and click Open. The list changes at once.
  4. Read the list: it shows the values the EA will use, and a file name proves nothing.
  5. To let the EA trade, tick Allow Algo Trading on the Common tab (older builds: AutoTrading); loading a set does not. A stop badge on the chart icon afterwards means another layer blocks it: Automated trading is disabled in MT5.
  6. Click OK. According to MetaTrader 5 Help, the EA is re-initialized with the new inputs at this moment.

Step 6 matters for grid EAs: re-initializing restarts the EA's logic, and what happens to open positions depends on how it was written. For Midas, the install guide says to change nothing while a basket is open.

How do you save your own EA settings in MT5?

To save your own EA settings in MT5, open the Inputs tab, click Save, name the file and confirm. Save before you change a set that works for you, because Reset restores the author's defaults, not your values. Put the date and account type in the name (GridEA_cent_2026-10-08.set, not final2.set) and keep a copy somewhere you back up.

A five-minute drill on a demo account. Drag the sample EA (Navigator → Expert Advisors → Examples → MACD → MACD Sample) onto a chart, untick Allow Algo Trading on the Common tab and keep the toolbar's Algo Trading button off, because the sample can open demo trades once trading is allowed. On the Inputs tab change Lots from 0.1 to 0.2 and Save as lots02.set. Click Reset (Lots is 0.1 again), then Load the file (0.2). Open it in a text editor and find the InpLots= line. The tab shows labels; the file stores names.

To copy settings to another terminal or a VPS, move the file, install the same EA version there and use Load.

Where are .set files stored?

MT5 stores .set files in the terminal's data folder: sets saved from a chart's Inputs tab go to MQL5\Presets, and sets from the Strategy Tester go to MQL5\Profiles\Tester. Open the data folder with File → Open Data Folder. Do not type the path: it contains a long hash, and every installed terminal, a second MT5 from another broker included, has its own folder. On a Mac it opens Finder.

WhatFolder inside the data folder
Sets saved from a chart's Inputs tabMQL5\Presets
Sets from the Strategy TesterMQL5\Profiles\Tester
EA programs (.ex5)MQL5\Experts
Templates (.tpl)MQL5\Profiles\Templates
Chart profilesMQL5\Profiles\Charts

All five rows come from the Files and Folders page of MetaTrader 5 Help; the sample MACD Sample.set sits in Tester. MQL5\Presets did not exist yet in the fresh install we read, so look again after your first Save. A .set is an ordinary file, so Load can open it from Downloads too.

What is the difference between a .set file, a template and a profile?

A .set file stores the input values of one EA, a template stores one chart together with its running EA, and a profile stores all open charts.

.set fileTemplate (.tpl)Profile
HoldsInput values of one EAOne chart: colours, indicators, objects, a running EA with its parametersAll open charts, their position and size, the templates applied
Applied withInputs tab → LoadChart menu or right-click → TemplatesFile → Profiles

A template stores the running EA with its parameters. Apply it later and the EA starts again with those values (the MQL5 Reference calls this reason REASON_TEMPLATE). A profile keeps charts together with their running EAs and, per the Help, saves changes in open charts automatically. So after a restart or profile switch an EA can come back with the inputs stored there, not those of a .set you loaded last month.

How do you load a .set file in the Strategy Tester and run a backtest?

To backtest an EA in the MT5 Strategy Tester, open the tester (Ctrl+R), pick the EA, symbol, timeframe and dates, load the .set file on the tester's own Inputs tab and start the test. A backtest shows how the rules behave on historical data, not live spread or slippage; see how to verify an EA's track record.

  1. Open the tester (View → Strategy Tester, Ctrl+R) and pick the EA, symbol, timeframe and dates on the Settings tab.
  2. Open the tester's Inputs tab. This list belongs to the tester, not to any chart.
  3. Right-click the list and choose Load, then pick the file. The tester Help describes the saving side: Save writes a set-file you can move to another computer; Save Version and Load Version keep presets inside this terminal. Menu labels vary by build.
  4. Read the list, then start the test.

A set saved from a chart is usually plain name=value lines and a tester set adds range fields, so recheck the list when you carry a file across. The terminal keeps each tested EA's last-used inputs in a file named after it in MQL5\Profiles\Tester; save yours under another name. And WebRequest cannot run in the tester, so an EA that needs it, for a license check say, may not be testable there: WebRequest not allowed in MT5.

Why do values not load, or change back?

Read the Inputs tab first: it shows what the EA runs with. Check you are in the right terminal too (each has its own data folder). Then match the symptom.

What you seeMost likely causeWhat to check
The list changed, the EA acts as beforeThe window was closed without OK; new inputs apply after OKReopen the properties (F7) and read the tab
Some lines loaded, others did notA new EA version renamed or dropped an input, so the line has nothing to attach toSave a fresh set from the current version and compare the two files
Old values return after a restart or profile switchThe profile or a template restores the EA with the inputs stored in itLoad again in the profile you use (it saves chart changes by itself); re-save the template if you apply one
One chart changed, another did notEach chart's EA has its own inputsRepeat Load on every chart
Values are right, but no trading or license errorsAlgo Trading and the WebRequest list are separate from the set; a personal key is usually tied to one account numberStep 5 above and the WebRequest note in the tester section
The EA's panel shows another number than the tabInputs are read-only for the program; it may copy them and adjust its copiesThe EA's documentation

Why should you never post a .set file that holds a personal key?

A .set can carry anything an EA exposes as an input: a license key, an account number, a messaging token, a password, and whoever gets the file reads those lines. Before posting one, copy it, delete the lines with keys, tokens, passwords and logins from the copy, and send the copy. A screenshot of the Inputs tab leaks the same lines.

Midas is an example: an MT5 Expert Advisor that trades gold with a grid and needs a hedging cent account. The Telegram bot @MidasGridBot sends Midas5.ex5 and a personal Midas5_<account>.set with your license key inside (install guide, steps 3, 4 and 8). The key belongs to one account number, so treat the file like a password; if one was posted, write to support in the bot. The panel's tabs: Panel settings explained.

What can go wrong?

  • A file built for another account type. On a cent account of the kind Midas is built for, a 0.01 lot of gold usually moves the real balance by one cent per $1 of price (0.01 × 1 ounce × $1). On a standard account with the usual 100-ounce contract it moves it by $1 (0.01 × 100 × $1), so one file trades about 100 times the money. Read the contract size in the symbol specification. See What is a cent account?.
  • Someone else's numbers. In a martingale grid the start lot, step, multiplier and order count decide how large and how deep the basket can grow; loading a stranger's file unread accepts their risk. The grid calculator shows the arithmetic of those numbers before you load them. It is not a forecast.
  • Hand edits. A deleted separator or a changed name may leave an input at its default. Edit a copy and reread the Inputs tab after Load.
  • Unknown downloads. A .set is text and does not run by itself; the .ex5 that often comes with it does. MetaTrader 5 Help advises keeping DLL imports off for unknown Expert Advisors.

Martingale-style grid trading can lose part or all of the deposit; a .set file changes the numbers, not that fact. Nothing here is investment advice or a forecast. More in Risk, plainly.

FAQ

Where do I put a .set file in MT5?

Nowhere in particular. Attach the EA, open the Inputs tab, click Load and browse to the file. MT5 saves its own sets in MQL5\Presets (chart) and MQL5\Profiles\Tester (tester) inside the data folder, which File → Open Data Folder opens. Copying a file there is optional: Load opens a file from any folder.

How do I install and run an Expert Advisor in MT5?

Copy the EA's .ex5 file into MQL5\Experts inside the data folder (File → Open Data Folder), open the chart of the symbol the EA is meant for and drag the EA from the Navigator (Ctrl+N) onto it. Tick Allow Algo Trading on the Common tab, optionally load a .set file on the Inputs tab, and press OK. For Midas, the install guide uses an XAUUSD M1 chart and adds its license address to the WebRequest list.

Can an MT4 Expert Advisor or its .set file be used in MT5?

An EA built for MT4 (.ex4) does not run in MT5; the EA must exist as an MT5 version (.ex5). Its .set file carries over only if that MT5 version uses the same input names, because a .set holds values, not code. MT5 accounts are also either hedging or netting. Midas exists only for MetaTrader 5 and trades XAUUSD only.

Can I trust a .set file from the internet?

A .set file holds values, not code, so it does not run by itself, but loading it changes your EA's numbers: read what it sets first, and for a grid check lot size, multiplier and order count. A .set can also contain a license key, account number or token, so never post one that holds a personal key. Be more careful with the .ex5 that often comes with it.

How do I backtest an Expert Advisor in the MT5 Strategy Tester?

Open the Strategy Tester (View → Strategy Tester, Ctrl+R), pick the EA, symbol, timeframe and dates on the Settings tab, load your .set file on the tester's Inputs tab and start the test. A backtest is a simulation on past prices, not a record of real trades. WebRequest does not run in the tester, so an EA with a web license check may not be testable there.

Why do my .set values change back in MT5?

After a restart or profile switch an EA can come back with the inputs stored in the profile or template, not those of a .set you loaded earlier. Load the set again in the profile you actually use and re-save the template if you apply one. Also check that you closed the properties window with OK, because new inputs apply after OK.

Sources

Retrieved 8 October 2026: MetaTrader 5 Help, Input parameters of trading robots, Files and folders, Templates and profiles, Strategy Tester settings and inputs, Options, Hot keys. MQL5 Reference, Input variables, Deinitialization reasons, WebRequest. Midas, Install Midas in 10 steps. The sample MACD Sample.set and the folder layout were read from a MetaTrader 5 installation.