How to Install Custom Indicators in MT4 and MT5

A step-by-step walkthrough for adding a custom indicator you've downloaded, from locating the correct MetaTrader folder to getting it to appear on your chart and stay there.

If you've been handed an indicator file by a signal provider, picked one up from a forum, or downloaded one from a marketplace, getting it onto your chart is mostly a case of putting the right file in the right folder. Knowing how to install custom indicators in MT4 and MT5 means understanding two things: which file type you've got, and which platform's data folder it belongs in. Get either wrong and the indicator simply won't appear, with no error message to explain why.

This guide walks through both installation paths — compiled files that are ready to use, and raw source code that needs compiling first — plus how to attach the indicator correctly, save your setup so it survives a restart, and fix the handful of reasons indicators fail to show up.

Trading on the back of any indicator, custom or built-in, carries risk, and no indicator can remove the possibility of losses. This article is about installation, not about which indicator to use or how to interpret its signals.

What You Need Before You Start

Before touching any folders, work out what file you've actually been sent. Custom indicators for MetaTrader come in two distinct formats, and they're installed in completely different ways.

The distinction matters because the installation steps diverge immediately: a compiled file goes straight into a folder and gets refreshed in the terminal, while a source file has to pass through MetaEditor first. If you're not sure which you've got, check the file extension — .ex4/.ex5 means compiled, .mq4/.mq5 means source.

It's also worth knowing whether you're running MT4, MT5, or both, since the next step depends entirely on that.

Finding the MetaTrader Data Folder

Every MetaTrader installation keeps its indicators, scripts, and expert advisors in a "data folder" that's separate from the folder where the program itself is installed. This trips people up constantly — they go looking in Program Files and either can't find an Indicators folder or find the wrong one.

The reliable way to find it every time is from inside the terminal itself:

  1. Open MetaTrader and go to File > Open Data Folder.
  2. A Windows Explorer window will open directly at the correct location for that specific terminal.
  3. Navigate into MQL4 (for MT4) or MQL5 (for MT5), then into the Indicators subfolder.

That Indicators folder is where every custom indicator file needs to end up. Using File > Open Data Folder rather than hunting manually also avoids a common error: if you have more than one broker's MT4 or MT5 installed, each one has its own separate data folder, and File > Open Data Folder always takes you to the one belonging to the terminal you launched it from.

MT4 vs MT5 Folder Differences

If you run both MT4 and MT5 on the same machine — which many gold and forex traders do, since not every broker offers both on the same account — it's easy to drop a file into the wrong platform's folder without realising.

MT4MT5
Data folder subpathMQL4/IndicatorsMQL5/Indicators
Compiled file type.ex4.ex5
Source file type.mq4.mq5
Compatible with the other platform?NoNo

An .ex4 file placed in the MQL5/Indicators folder will never appear in MT5's Navigator, and the reverse is equally true. MT4 and MT5 use different compilers and different internal architectures, so a compiled file built for one simply isn't recognised by the other. If you've confirmed the file is in the Indicators folder and it still won't show, the first thing to check is whether you've put an MT4 file into an MT5 terminal, or vice versa.

Installing a Compiled Indicator (.ex4 or .ex5)

This is the scenario most traders find themselves in — someone has sent you a ready-made .ex4 or .ex5 file, often attached directly in a Telegram message or zipped up with a set of instructions. To add a custom indicator to your MT4 or MT5 chart in this form:

  1. Locate the data folder using File > Open Data Folder, as described above.
  2. Open the MQL4/Indicators folder (MT4) or MQL5/Indicators folder (MT5).
  3. Copy the .ex4 or .ex5 file into that folder. If it came zipped, extract it first — don't copy the zip itself.
  4. Return to the MetaTrader terminal. You don't need to restart the whole platform.
  5. Open the Navigator panel (Ctrl+N if it's hidden), find the Indicators branch, right-click it, and choose Refresh.
  6. The new indicator should now appear in the list, ready to be attached to a chart.

If it doesn't appear after refreshing, double-check you copied it into the Indicators folder specifically, not the parent MQL4 or MQL5 folder, and that you refreshed the correct terminal if you have more than one open.

Installing Source Code (.mq4 or .mq5) and Compiling in MetaEditor

Sometimes what lands in your inbox or forum download is raw source code rather than a finished file — for example, an .mq4 file someone has posted so other traders can inspect or tweak the logic. MetaTrader can't run this directly; it needs to be compiled into an .ex4 or .ex5 file first.

Here's how that looks in practice with an .mq4 file received from a forum thread:

  1. Open MetaEditor from within MT4 (there's a button for it on the toolbar, or press F4).
  2. In MetaEditor, go to File > Open and select the .mq4 file you've saved locally — or paste the source folder into MQL4/Indicators first and open it from there, which keeps everything in the right place automatically.
  3. With the file open, click Compile (or press F7).
  4. Check the Errors tab at the bottom of the MetaEditor window. A successful compile shows 0 errors, 0 warnings. If you see errors, the file may be incomplete, written for a different platform version, or missing supporting library files that should have come with it.
  5. Once compiled successfully, MetaEditor automatically creates the matching .ex4 file in the same Indicators folder.
  6. Switch back to the MT4 terminal, refresh the Navigator's Indicators branch as described above, and the newly compiled indicator will appear.

The process for .mq5 files in MT5 is identical — open MetaEditor from MT5, compile, check for 0 errors and 0 warnings, and refresh the Navigator. Warnings alone (without errors) usually still produce a usable file, but errors mean nothing gets compiled at all.

Attaching the Indicator to a Chart

Once an indicator shows up in the Navigator, attaching it works the same way whether it's a built-in tool or a custom one you've just installed, and there's no AutoTrading toggle to worry about the way there is with expert advisors — custom indicators run as soon as they're attached.

Say you've just installed a custom oscillator and want it on a EURUSD H1 chart:

  1. Open the EURUSD chart and set the timeframe to H1.
  2. In the Navigator, find your indicator under the Indicators branch.
  3. Drag it directly onto the chart, or double-click it with the chart in focus.
  4. A properties window opens. Go to the Inputs tab, where you'll usually find settings like the calculation period — if the default is 14 and you want 21, change it here before confirming.
  5. Click OK. The indicator draws onto the chart immediately, either in the main window or in a separate panel beneath it, depending on how it's designed.

Any changes to inputs at this stage only apply to that specific chart. If you want the same settings on every EURUSD chart you open, or across other pairs, you'll need to save them into a template.

Saving a Template So It Loads Automatically

Getting an indicator onto a chart once is only half the job — most traders want it there every time they open MetaTrader without re-attaching it manually. This is the step a lot of guides skip, and it's where people lose their setup after restarting the terminal or rebooting their computer.

To make a chart's indicator setup persistent:

  1. With the indicator (and any other settings you want kept) applied to the chart, go to Charts > Template > Save Template.
  2. Save it with a recognisable name, or save it specifically as Default.tpl if you want it applied automatically to every new chart of that type.
  3. Separately, to make sure MetaTrader reopens with this exact chart layout and symbol next time, go to File > Profiles and set the current profile as the one that loads on startup, or save it as a named profile you select manually.

The template controls what's on the chart; the profile controls which charts and layout open when the terminal starts. Setting both is the only reliable way to guarantee the indicator is still running after you close and reopen MetaTrader — saving the template alone only helps if you reapply it or if it's set as the default for new charts.

Troubleshooting: Indicator Not Showing or Not Working

An indicator not showing on MT4 or MT5 almost always comes down to one of a small number of causes, and they're straightforward to check in order.

SymptomLikely CauseFix
File copied in but not in NavigatorWrong platform folder (MQL4 vs MQL5)Confirm file extension matches platform; re-copy to correct Indicators folder
In Navigator but won't attach or chart stays blankNavigator not refreshed after copyingRight-click Indicators in Navigator, choose Refresh
Won't compile in MetaEditorErrors or warnings in source codeCheck Errors tab; fix or request a corrected source file
Attaches but no data or function calls failDLL imports blockedEnable "Allow DLL imports" in the indicator's Properties, if you trust the source
Worked before, gone after an updateIndicator removed or reset during a terminal updateReinstall the file into the (possibly rebuilt) data folder and refresh Navigator

The DLL import issue is worth a specific mention, since it often looks like a broken indicator rather than a permissions setting. Some indicators call external DLL files for extra functionality, and MetaTrader blocks this by default for security reasons. You'll find the option to allow DLL imports in the indicator's properties window under the Common tab — only enable it for indicators from a source you trust, since DLLs run outside MetaTrader's normal sandboxing.

Terminal updates occasionally reset or relocate data folders, particularly after a reinstall rather than a simple version bump, which is why a custom indicator that worked fine yesterday can vanish after an update with no error at all. The fix is the same as a fresh install: open the data folder, confirm the file is still there, and refresh the Navigator.

Frequently asked questions

Can I use an MT4 indicator file in MT5?

No. .ex4 and .mq4 files are built for MT4's architecture and compiler, and MT5 cannot read or run them directly. If you only have an MT4 version of an indicator and need it on MT5, you'd need the .mq5 source rewritten and compiled for MT5, or a separate MT5 build of the same tool.

Why does my indicator appear in the Navigator but not on the chart?

This usually means it's installed correctly but hasn't actually been attached, or it was attached and then removed. Drag it from the Navigator onto the chart again, and check the chart's top-left corner for its name confirming it's active; if it's there but still invisible, it may be plotting in a separate subwindow below the price chart rather than on the price itself.

Do custom indicators repaint, and how can I tell if one does?

Some custom indicators recalculate past values as new price data comes in, which is known as repainting, and it can make historical signals look better than they were in real time. You can get a sense of this by watching recent bars on a live chart — if values near the current price keep changing after they first appear, rather than staying fixed once a candle closes, that's a sign of repainting.

Can I install a custom indicator on the MetaTrader mobile app?

Generally, no — the mobile apps for MT4 and MT5 don't support adding custom .ex4, .ex5, .mq4 or .mq5 files the way the desktop terminal does. Custom indicators need to be installed on the desktop platform; some setups allow syncing a template to mobile, but the installation itself happens on desktop.

Is it safe to download custom indicators from third-party websites?

Compiled files (.ex4/.ex5) run as executable code on your machine, so only install files from sources you have reason to trust, the same way you'd treat any downloaded software. Source files (.mq4/.mq5) are at least readable in MetaEditor before compiling, which gives you a chance to see what the code actually does, though reading unfamiliar code isn't always straightforward if you're not comfortable with MQL.

How many custom indicators can I run on a single chart at once?

There's no fixed small limit baked into the platform for normal use, and traders commonly run several indicators on one chart. In practice, the limiting factors are chart readability and your own computer's processing capacity, not a hard cap MetaTrader enforces.

Why did my custom indicator disappear after updating MetaTrader?

Updates sometimes rebuild or relocate the data folder, particularly larger version updates rather than minor patches, which can leave your Indicators folder empty even though the rest of your settings look normal. The fix is to reopen the data folder via File > Open Data Folder, confirm whether the file is still there, and if not, reinstall it exactly as you did the first time.

Getting Your Setup to Stick

The installation steps themselves are quick once you know them — the real value is in checking the right things in the right order when something doesn't work: correct platform folder, Navigator refreshed, clean compile with zero errors, and a saved template and profile so it's all still there next time you open the terminal. Work through those in sequence and most "indicator not showing" problems resolve in a couple of minutes rather than a long troubleshooting session.

Frequently asked questions

Can I use an MT4 indicator file in MT5?

No. `.ex4` and `.mq4` files are built for MT4's architecture and compiler, and MT5 cannot read or run them directly. If you only have an MT4 version of an indicator and need it on MT5, you'd need the `.mq5` source rewritten and compiled for MT5, or a separate MT5 build of the same tool.

Why does my indicator appear in the Navigator but not on the chart?

This usually means it's installed correctly but hasn't actually been attached, or it was attached and then removed. Drag it from the Navigator onto the chart again, and check the chart's top-left corner for its name confirming it's active; if it's there but still invisible, it may be plotting in a separate subwindow below the price chart rather than on the price itself.

Do custom indicators repaint, and how can I tell if one does?

Some custom indicators recalculate past values as new price data comes in, which is known as repainting, and it can make historical signals look better than they were in real time. You can get a sense of this by watching recent bars on a live chart — if values near the current price keep changing after they first appear, rather than staying fixed once a candle closes, that's a sign of repainting.

Can I install a custom indicator on the MetaTrader mobile app?

Generally, no — the mobile apps for MT4 and MT5 don't support adding custom `.ex4`, `.ex5`, `.mq4` or `.mq5` files the way the desktop terminal does. Custom indicators need to be installed on the desktop platform; some setups allow syncing a template to mobile, but the installation itself happens on desktop.

Is it safe to download custom indicators from third-party websites?

Compiled files (`.ex4`/`.ex5`) run as executable code on your machine, so only install files from sources you have reason to trust, the same way you'd treat any downloaded software. Source files (`.mq4`/`.mq5`) are at least readable in MetaEditor before compiling, which gives you a chance to see what the code actually does, though reading unfamiliar code isn't always straightforward if you're not comfortable with MQL.

How many custom indicators can I run on a single chart at once?

There's no fixed small limit baked into the platform for normal use, and traders commonly run several indicators on one chart. In practice, the limiting factors are chart readability and your own computer's processing capacity, not a hard cap MetaTrader enforces.

Why did my custom indicator disappear after updating MetaTrader?

Updates sometimes rebuild or relocate the data folder, particularly larger version updates rather than minor patches, which can leave your Indicators folder empty even though the rest of your settings look normal. The fix is to reopen the data folder via File > Open Data Folder, confirm whether the file is still there, and if not, reinstall it exactly as you did the first time.