The short answer
To install an indicator in MT5: File → Open Data Folder → MQL5 → Indicators, copy the .ex5 or .mq5 file in, then right-click Indicators in the Navigator → Refresh (or restart MT5). Drag it from the Navigator onto your gold chart, set its inputs and click OK. MT4 works the same way in the MQL4 → Indicators folder with .ex4 or .mq4 files.
To keep the setup, right-click the chart → Templates → Save Template. Only install files from sources you trust.
Step by step: MT5
- In MT5, click File → Open Data Folder. A file window opens at your terminal’s data folder. This is not the same as the program folder in Program Files.
- Open MQL5, then Indicators. You can create a subfolder for your own indicators to keep things tidy.
- Copy the indicator file into it: the .ex5 file (compiled), or the .mq5 file (source). If the indicator came with extra files, such as a library or include file, follow its instructions for where they go.
- Back in MT5, open the Navigator (Ctrl+N). Right-click Indicators → Refresh. MetaQuotes’ MetaEditor help notes the Navigator can also be refreshed with F5 there; restarting MT5 works too.
- Find the indicator under Indicators in the Navigator. Drag it onto the chart, or double-click it.
- In the window that opens, set the Inputs. Some indicators also show an Allow DLL imports option (its tab depends on the build). Leave it unticked unless you know exactly why the indicator needs it and trust its source.
- Click OK. Check the Experts tab in the Toolbox (Ctrl+T) for errors if nothing appears.
If you only have an .mq5 file
MT5 runs compiled .ex5 files. If the indicator doesn’t load, open the .mq5 in MetaEditor (F4 from MT5, or right-click the file in the Navigator → Modify) and click Compile. A successful compile creates the .ex5 next to it. Errors in the compile log usually mean the file was written for MT4 or needs a missing include file.
Step by step: MT4
- File → Open Data Folder → MQL4 → Indicators.
- Copy the .ex4 or .mq4 file in.
- In the Navigator, right-click Indicators → Refresh, or restart MT4.
- Drag the indicator onto the chart, set inputs, click OK.
MT4 and MT5 files are not interchangeable. An indicator written for MT4 must be rewritten for MT5, not just renamed.
Expert Advisors and scripts go elsewhere
| File type | MT5 folder | MT4 folder |
|---|---|---|
| Indicators | MQL5\Indicators | MQL4\Indicators |
| Expert Advisors (EAs) | MQL5\Experts | MQL4\Experts |
| Scripts | MQL5\Scripts | MQL4\Scripts |
| Templates (.tpl) | MQL5\Profiles\Templates | templates |
EAs also need algorithmic trading enabled: the Algo Trading button on the MT5 toolbar (AutoTrading on MT4). Before running any EA on gold, read our gold EA and bot checklist.
Why the indicator doesn’t appear: quick fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Not in Navigator at all | Wrong folder (program folder, or MQL4 instead of MQL5) | Use File → Open Data Folder and the right MQL folder |
| Not in Navigator after copying | Navigator not refreshed | Right-click Indicators → Refresh, or restart |
| Appears but does nothing | Missing dependency, or an error in the Experts tab | Read the Experts tab; check the author’s instructions |
| Will not compile | MT4 source in MT5, or missing include file | Use the right version; get the missing file from the author |
| Draws differently from TradingView | Different data feed or settings | Compare inputs; see why gold prices differ between platforms |
Save your setup: templates, default.tpl and profiles
Templates store a chart’s look and tools. According to MetaQuotes’ help, a template stores the chart type and colours, scale, applied indicators with their settings, attached EAs with their parameters, graphical objects and day separators.
- Set up a gold chart with your indicators.
- Right-click the chart → Templates → Save Template. Name it, for example “gold-ema-atr”.
- To apply it to any chart: right-click → Templates → pick it from the list, or Load Template to open one from another folder.
- To make every new chart open with it, save it as default.tpl.
Profiles store your whole workspace: all open charts and their layout. Use File → Profiles → Save As to create one. Changes to open charts are saved to the current profile automatically, so switch to a copy before experimenting.
Moving to a new computer: copy your .tpl files from the data folder’s template location, and your indicator files from MQL5\Indicators, to the same places on the new installation. Install the indicators before loading the templates, or the template will open without them.
Updating or removing an indicator
- Remove it from a chart: right-click the chart → Indicators List, select the indicator and click Delete. The file stays installed for other charts.
- Update it: close the charts that use it, replace the old file in the same Indicators folder with the new version, refresh the Navigator and attach it again. Check that the inputs you saved in your templates still make sense, because a new version can rename or add inputs.
- Uninstall it: delete the file from the Indicators folder in the data folder, then refresh the Navigator. Templates that used it will open without it.
- Keep a copy of the original download and a note of where it came from, so you can roll back if an update behaves differently.
Stay safe with downloaded indicators
- Prefer readable source (.mq5, .mq4) over compiled-only files, so you or someone you trust can see what the code does.
- Be careful with DLL imports. An indicator that needs “Allow DLL imports” can run code outside MetaTrader.
- Use sources with a track record: the MQL5 Market and Code Base built into the platform, or developers with long public histories.
- Never type your account password into anything an indicator or its website asks for.
- Be sceptical of “non-repainting, 95% accurate” claims. Indicators describe past prices. Our indicator settings tests on real gold data found that many popular settings lost money after costs.
- Scan downloads with your security software before copying them into the data folder.
Which indicators are worth installing?
MT5 already includes the common ones (moving averages, ATR, RSI, Ichimoku and more). Most gold traders don’t need custom indicators at all. Our guides to the best indicators for gold trading and indicator settings tested on gold show what held up on real data.
Sources
- MetaQuotes, MetaEditor help: MetaEditor environment folders (Indicators folder) and Navigator (Refresh)
- MetaQuotes, MT5 help: Templates and profiles
- Menu paths for MT4 follow the same structure; labels can differ slightly between builds
Educational content only, not financial advice. Only install software from sources you trust. Trading gold with leverage carries a high risk of loss.
Frequently asked questions
Where do I put an indicator file in MT5?
In MT5, go to File, Open Data Folder, then open MQL5 and then Indicators, and copy the .ex5 (or .mq5) file there. Then right-click Indicators in the Navigator window and choose Refresh, or restart MT5. The indicator appears under Indicators in the Navigator, ready to drag onto a chart.
Where do indicators go in MT4?
The same way, but in the MQL4 folder: File, Open Data Folder, MQL4, Indicators. MT4 indicators use .ex4 and .mq4 files. MT4 files do not work in MT5 and MT5 files do not work in MT4.
Why doesn't my indicator show in the Navigator?
Usually because the file is in the wrong folder (the program folder instead of the Data Folder), it is an MT4 file in MT5 or the reverse, it is a source .mq5 file that has not been compiled, or the Navigator has not been refreshed. Check the folder, refresh the Navigator, and check the Experts tab of the Toolbox for error messages.
What is the difference between .ex5 and .mq5 files?
An .mq5 file is the readable source code; an .ex5 file is the compiled program MT5 runs. MT5 needs the .ex5. If you only have the .mq5, open it in MetaEditor and compile it, which creates the .ex5 next to it. Having the source lets you, or someone you trust, read what the indicator does.
Is it safe to download MT5 indicators?
Only from sources you trust. Compiled indicators can contain code you cannot read, and an indicator that asks to allow DLL imports can run code outside MetaTrader. Prefer source files you can read, the built-in MQL5 Market, or developers with a long public track record, and never enter account passwords into anything an indicator asks for.
Comments
No comments yet.