New

Complete Suite: all 11 tools. 5 new Premium desks inside.All 11 tools $557.98 one by one

$557.98 one by one $97 once Save $460.98Get the SuiteGet it
ProEA Lab · MT5, TradingView and trading research · Evidence standards

How to Open .mq5, .ex5 and .set Files (and Where They Go in MT5)

Open yours below. Nothing is uploaded, and an .ex5 is never decompiled.

Open an .mq5, .ex5, .set or .tpl file here. It's read in your browser, never uploaded; a compiled .ex5 is identified, never decompiled.

Example · ProEA-Example-EA.mq5

Ready to compile
Type
Source (.mq5)
Program
Expert Advisor
Goes in
MQL5\Experts
Inputs
10

The source's defaults, in the layout MT5 saves. You can edit them before saving.

  1. 1Open Data Folder
  2. 2Drop in Experts
  3. 3F4, then F7
See its 10 inputs
  • Risk
  • InpRiskPercentRisk per trade, % of balance · double0.5
  • InpMaxTradesMax open trades · int3
  • InpUseTrailingTrail the stop · booltrue
  • Signal
  • InpSignalTFSignal timeframe · ENUM_TIMEFRAMES16385source: PERIOD_H1
  • InpEntryModeEntry mode · ENUM_ENTRY_MODE1source: ENTRY_PULLBACK
  • InpMagicMagic number · int20261023
  • Display
  • InpLineColorLine colour · color16748574source: clrDodgerBlue
  • InpCommentOrder comment · stringproea-examplesource: "proea-example"
  • InpStartDateIgnore bars before · datetime1767571200source: D'2026.01.05 00:00'
  • InpNoteNote (never optimised) · sinput stringdemo onlysource: "demo only"
#property lines (4)
  • copyrightProEA Lab (example)
  • linkhttps://proea.app/open/mt5
  • version1.00
  • descriptionExample EA for the MT5 file opener: shows how inputs become a .set file.

Next step

Compile it, then attach it

Open it in MetaEditor (F4 in MT5) and press F7; the .ex5 it builds appears in Navigator. Drag that onto a chart and switch on Algo Trading.

Trades rejected once it runs? Look up the return code.

Know someone stuck with an .ex5 or a .set?

Sell EAs? The install note for your buyers. The example files are ours; the example EA compiles in MetaEditor with 0 errors and places no trades.

PL · 6 min read
An .mq5 file is MQL5 source code: open it in MetaEditor (press F4 in MT5) or any text editor. An .ex5 is a compiled program: it can't be read, only run, from MQL5\Experts (or Indicators). A .set is a plain-text list of input values: load it from the EA's Inputs tab with Load.

Open a file in the opener above and it names it. For source, it lists the #property lines and every input, and can make a .set from them. For a preset, it shows the values, lets you change them, and saves a new .set in MT5's own layout. For an .ex5, it checks the first three bytes and says where it goes. It never decompiles, and nothing you open leaves your browser.

We built the .set side from the 187 presets in the MT5 terminals on our own machines, 184 of them saved by MT5 itself, and proved every built-in value it writes (a PERIOD_H1 input is stored as 16385) by compiling against MetaEditor.

Which MT5 file do you have?

Look at the extension: .mq5 and .mqh are readable code, .ex5 is compiled, .set is a preset. The table says what opens each and where it goes. Every folder sits inside MT5's data folder, which File → Open Data Folder opens.

FileWhat it isOpen it withGoes in
.mq5MQL5 source code, plain textMetaEditor (F4) or any text editorMQL5\Experts, Indicators or Scripts
.mqhInclude file: code a program pulls inMetaEditor or any text editorMQL5\Include, or next to its .mq5
.ex5Compiled MT5 programNothing: MT5 runs itMQL5\Experts, Indicators or Scripts
.setInput preset, plain textInputs tab → Load, or a text editorMQL5\Presets
.mq4, .ex4MT4's source and compiled programMT4MT4's MQL4 folder; MT5 can't run them

MetaQuotes' Files and Folders help describes Experts as holding "compiled files (*.ex5) and source code files (*.mq5)", and says sets of input parameters are stored in Presets (read 2026-10-23). On our Windows machines each terminal's data folder is under AppData\Roaming\MetaQuotes\Terminal, one per installed MT5; the menu command finds the right one for you.

How do I open an .mq5 file?

With any text editor, since it's plain text, or with MetaEditor, the editor that also compiles it. In MT5, press F4 to open MetaEditor, then File → Open. From Navigator, right-click an EA and choose Modify to open its source.

An .mq5 never shows in Navigator itself; only the compiled .ex5 does (MetaQuotes). To get one, press F7 in MetaEditor and read the Errors tab. Most source opens as UTF-8 or ANSI text, and some (MetaQuotes' own examples among them) as UTF-16; the opener reads all three.

Is there an .mq5 to .ex5 converter?

Yes: MetaEditor's compiler, and it's free. Open the .mq5, press F7, and the .ex5 appears next to it. A file the source includes has to be where it expects: #include <…> looks under MQL5\Include, #include "…" next to the source. The opener lists both kinds, so a missing .mqh shows up before you compile. Our install guide has the compile steps in full.

How do I open an .mq5 file on Android?

Any text-viewer app shows it, and the opener above works in a phone's browser. Compiling is another matter: MetaEditor runs on a computer.

How do I open an .ex5 file?

You don't open it; you run it. An .ex5 is compiled. MT5 loads it from the right folder:

  1. File → Open Data Folder, then MQL5\Experts for an EA, MQL5\Indicators for an indicator, MQL5\Scripts for a script. Subfolders are fine.
  2. Copy the .ex5 in.
  3. In Navigator, right-click and choose Refresh, then drag it onto a chart.

The file can't tell you which kind it is, at least not without decompiling it, and its name often doesn't. The seller's instructions should. If they don't, try Experts first; if it isn't under Expert Advisors after Refresh, move it to Indicators.

An .ex5 can't be viewed or edited. Sites that offer to turn one back into .mq5 are decompilers. We don't offer that or link to one: decompiling someone else's program can breach its license and copyright. If you need to read or change the code, ask the seller for the .mq5.

How do I open an .ex5 file on Android or iPhone?

You can't run one there. MetaQuotes' Android and iPhone help have no section on Expert Advisors or custom indicators: their contents run from Getting Started to Settings, and the iPhone app's indicators are its 30 built-in ones (read 2026-10-23).

So an .ex5 runs in MT5 on a Windows PC, on a Mac through MetaQuotes' installer, or on a server. MetaQuotes' Virtual Hosting takes EAs you move from the desktop terminal (our MT5 VPS guide). The phone app can then watch the account the EA trades.

How do I open an .ex5 file on a Mac?

The same way as on Windows, in MT5 for Mac. MetaQuotes' macOS installer runs the Windows terminal in Wine, and its data folder is at ~/Library/Application Support/net.metaquotes.wine.metatrader5/drive_c/Program Files/MetaTrader 5. The opener's Mac switch gives each file's full Mac path. MT5 for Mac covers the install.

Can I use an .ex4 in MT5?

No. An .ex4 is a compiled MT4 program, and it can't be turned into an .ex5. The MT4 source (.mq4) has to be ported to MQL5 and compiled; MT4 vs MT5 explains what changes.

Where is the .set file location in MT5?

MQL5\Presets, inside the data folder. That's where the Inputs tab's Save and Load buttons work, and MetaQuotes says "Sets of input parameters are stored in the /Presets folder" (running an EA).

The Strategy Tester keeps its own: MQL5\Profiles\Tester holds "*.set files with the last used sets of input parameters for each Expert Advisor that has ever been tested", per MetaQuotes' folder help. On a Mac both are under the Wine data folder above.

How do I load a .set file in MT5?

From the EA's Inputs tab: Load, pick the file, check the values, OK.

  1. Attach the EA to a chart, or double-click it in Navigator, to open its properties.
  2. On the Inputs tab, click Load and choose the .set.
  3. Read the values it filled in. A preset made for another version of the EA may not match its inputs.
  4. Press OK. Save on the same tab writes the current values to a new .set.

Loading a preset sets inputs; it doesn't switch on trading. The toolbar's Algo Trading button and the EA's own permission still decide that, as the install guide explains.

What's inside a .set file?

One input per line: name=value, with four more fields for anything MT5 can optimise. A line reads InpLots=0.1||0.1||0.01||1.0||N: the value, then the Strategy Tester's start, step and stop, then Y or N for whether that input is optimised. Strings and colors carry the value alone.

From the 187 presets on our machines (read 2026-10-23): 186 were UTF-16 text with a byte-order mark and Windows line ends. A boolean's start and stop are false and true, as in InpTrail=true||false||0||true||N. A timeframe or other enum is stored as its number, so PERIOD_H1 is 16385; a color as one number (clrDodgerBlue is 16748574); and a date as seconds since 1970. Lines starting with ; are comments.

To change a value by hand, edit only the part before the first || and keep the file's encoding. The opener does both for you: it changes the values you edit, writes every other line back as it was, and saves in the encoding the file came in.

Make a .set from an .mq5

The opener's Make a .set from these inputs writes the source's defaults in that same layout, with optimisation switched off. Most defaults resolve: numbers, booleans, strings, colors, dates, #defined values, this file's enums and MT5's common ones (timeframes, moving-average methods, applied prices). Some it won't guess at: a division, a name from another file, an input inside an #if block, or a number too big for its type, which the compiler would change. Those become comment lines naming the input, for you to set in MT5. Check every value before you press OK all the same: it's your account the EA trades.

For EA sellers: an install note your buyers can follow

Paste this into your zip's INSTALL.txt, your product page or your delivery email. It's free to use, needs no sign-up, and the link opens this page, where buyers can check each file you sent without uploading it:

HOW TO INSTALL (MetaTrader 5)
1. In MT5, choose File > Open Data Folder, then open MQL5 > Experts.
2. Copy the .ex5 file there. Got the .mq5 instead? Copy it there,
   press F4 to open MetaEditor, open the file and press F7 to compile.
3. In Navigator, right-click > Refresh, then drag the EA onto a chart.
4. To load the settings: in the EA's window, Inputs > Load > choose
   the .set file > OK. Check the values before you press OK.
5. Turn on Algo Trading in the toolbar, and tick Allow Algo Trading
   in the EA's properties window.

Not sure which file is which, or where it goes? Open it at
https://proea.app/open/mt5 (free; read in your browser, nothing uploaded).

The short link https://proea.app/open/mt5 redirects here and stays the same if this page ever moves. For a product page, one line does: "Not sure where a file goes? Open it in the free MT5 file opener at proea.app/open/mt5."

What's next?

  • Install and attach it: how to install an EA on MT5 covers folders, compiling, presets and permissions.
  • Trades rejected? Look up the Journal's return code in the MT5 error pages, each with what causes it and a fix.
  • After a demo run: export the history and read it in the MT5 report analyzer, in the browser too.
  • Want code you can read? MTR FullSystemEA ships as full source: 21 MQL5 files, 16,923 lines, including the 1,763-line .mq5 entry file. Readable source explains what an EA does; it doesn't prove it profits.
Can't read it? Ask for the .mq5.

Frequently asked questions

What is an .mq5 file?

MQL5 source code: the plain-text program behind an MT5 Expert Advisor, indicator or script. Open it in MetaEditor (press F4 in MT5) or any text editor. MetaEditor compiles it into an .ex5 when you press F7.

How do I open an .ex5 file?

You don't open it; you run it. An .ex5 is compiled, so it can't be read or edited. Put it in MQL5, then Experts (or Indicators, or Scripts) inside MT5's data folder, refresh Navigator and drag it onto a chart.

Can an .ex5 be converted back to .mq5?

Not by MetaTrader. Tools that claim to are decompilers, and decompiling someone else's program can breach its license and copyright, so we don't offer or link to one. If you need to read or change the code, ask the seller for the .mq5.

How do I convert .mq5 to .ex5?

Compile it: open the .mq5 in MetaEditor and press F7. The .ex5 appears next to it. Every file it includes must be where the source expects it, or the compile stops with errors.

Where is the .set file location in MT5?

Presets you save from an EA's Inputs tab go in MQL5, then Presets, inside the data folder (File, then Open Data Folder). The Strategy Tester keeps the last inputs it used for each EA in MQL5, then Profiles, then Tester.

How do I load a .set file in MT5?

Open the EA's properties (attach it to a chart, or double-click it in Navigator), go to the Inputs tab, click Load and choose the .set. Check the values it filled in, then press OK.

Can I open an .ex5 file on Android or iPhone?

Not to run it. MetaQuotes' Android and iPhone help have no section on Expert Advisors or custom indicators. Run the .ex5 in MT5 on a Windows PC, on a Mac through MetaQuotes' installer, or on a server, and watch the account from your phone.

Continue reading

MT5 EA Not Taking Trades? Six Checks and the Codes That Name Them

EA attached but no trades? Check both Experts and Journal, then the EA's permissions, symbol and request results. An empty log cannot identify the cause. Codes such as 10027, 10018, 10014 and 10019 help narrow the next check.

Oct 8 · ProEA Lab

Explainer cover titled MT5 EA not taking trades: six checks, one log line. A row of six check boxes, Algo Trading button, EA's own permission, account allows EAs, symbol is trading, lot size is valid and free margin, with the first one crossed out and the Journal line retcode 10027: Autotrading disabled by client terminal.

Every Tick vs Real Ticks in MT5: Why the Same EA Gets Two Results

MT5's tester can feed your EA the broker's recorded ticks, ticks it generates from each minute's OHLC, or just the four OHLC prices. When a stop and a target sit inside one minute, those modes can disagree on which one filled.

Oct 8 · ProEA Lab

Explainer cover titled Every tick vs real ticks: one minute, two results. A single 1-minute bull bar with a long trade's stop-loss at 2,398.00 and take-profit at 2,402.50 inside it, and the generated tick path going open, low, high, close, stopping out at the low before it reaches the target.

Walk-Forward Testing: Steps, Example and Limits

Optimize on earlier data, freeze the rules, test on the next unseen period and repeat. A dated walk-forward example, efficiency pitfalls and MT5 forward-test limits.

Aug 10 · ProEA Lab

A brass stencil sliding along a long paper chart strip, exposing only one unmarked section at a time while the rest stays covered — poster titled Judge the Unseen Part.