Check current options

MetaTrader Indicator Setup & Tutorials

How to Install a Custom Indicator in MetaTrader 4 and 5: .ex4, .mq4, .ex5 and .mq5 Files Step by Step

Installing a custom indicator takes about two minutes once you know which file you have and which platform you're on. Most failed installs come from a mism

By the Signal Ledger Editorial TeamPublished October 16, 20265 min read

Quick takeInstalling a custom indicator takes about two minutes once you know which file you have and which platform you're on. Most failed installs come from a mism
Check current options
Illustration for How to Install a Custom Indicator in MetaTrader 4 and 5: .ex4, .mq4, .ex5 and .mq5 Files Step by Step

Installing a custom indicator takes about two minutes once you know which file you have and which platform you're on. Most failed installs come from a mismatch between the two. This guide covers the file types, the exact steps, and what to check when nothing appears on the chart.

First, Identify Your File

The extension tells you what to do, and it must match your platform version.

ExtensionWhat it isWorks in
.ex4Compiled indicator (source code hidden)MetaTrader 4 only
.mq4Source code, which the platform compiles into .ex4MetaTrader 4 only
.ex5Compiled indicatorMetaTrader 5 only
.mq5Source code, which the platform compiles into .ex5MetaTrader 5 only

An MT4 file will not run in MT5, and renaming the extension does nothing useful. Converting requires rewriting the code. If you're unsure which platform suits you, see MetaTrader 4 vs MetaTrader 5 for Indicator Users: Compatibility, Conversion and Which Platform to Choose.

Before You Install: A Safety Note

A compiled file is a program running inside your trading platform. You can't read an .ex4 or .ex5, so you're trusting the source. Download only from the developer's official site or a marketplace you trust, and test on a demo account first. Be wary of anything promising guaranteed results; no indicator can deliver that. If a file asks you to enable DLL imports and you don't understand why, don't proceed.

Installing in MetaTrader 4

  1. Close any pop-up dialogs, then open MT4.
  2. Click File → Open Data Folder.
  3. Open the MQL4 folder, then Indicators.
  4. Copy your .ex4 or .mq4 file into that folder.
  5. Restart MT4, or right-click Navigator → Indicators and choose Refresh.
  6. Find the indicator under Navigator → Custom Indicators and drag it onto a chart, or double-click it.

If you have an .mq4 file

Open it in MetaEditor (press F4 in MT4) and click Compile. Check the Errors tab at the bottom. If it reports zero errors, an .ex4 is created beside it. Errors usually mean a missing include file or code written for a different build.

Installing in MetaTrader 5

  1. Open MT5 and choose File → Open Data Folder.
  2. Go to MQL5 → Indicators.
  3. Paste your .ex5 or .mq5 file there. You can place it in a subfolder to stay organized.
  4. Refresh the Navigator or restart the platform.
  5. Drag the indicator from Navigator → Indicators → Custom (or your subfolder) onto a chart.

Compile .mq5 files in MetaEditor the same way as above.

Recommended for youMetaTrader Indicator Not Showing or Not Working? Fixing Common Errors Step by Step

Configuring Settings on First Load

When you attach the indicator, a properties window opens. The Common tab controls things like allowing automated trading or DLL imports, which only matter if the indicator needs them. The Inputs tab holds its parameters: periods, colors, alert toggles. Defaults are the developer's choice, not a recommendation for your instrument or timeframe, so test any changes on history first.

Once your chart looks right, save it so you don't repeat the work. MetaTrader Templates, Profiles and Saved Settings explains how to save, reuse and transfer a setup. If the indicator includes alerts, see How to Set Up Indicator Alerts in MetaTrader.

If It Doesn't Appear or Doesn't Work

Run through these in order:

For a longer checklist, see MetaTrader Indicator Not Showing or Not Working? Fixing Common Errors Step by Step.

Common Questions About Where This Works

Tradeoffs Worth Knowing

Compiled files are convenient but opaque; source files let you inspect the logic but require you to compile and sometimes troubleshoot. Free indicators vary widely in quality, and paid ones aren't automatically better. Many indicators repaint, meaning past signals change after the fact, which makes backtests look better than live results. Always check behavior on a demo chart in real time.

Choosing What to Install

Installing is the easy part. Deciding what deserves a place on your chart is harder. Compare indicators by what they actually measure, whether they repaint, and how they behave on your instruments. Check current pricing, terms and features on each developer's official site before buying. For more walkthroughs, browse MetaTrader Indicator Setup & Tutorials, and use our review and comparison pages to weigh options side by side.

Trading leveraged products carries significant risk of loss. An indicator is a tool for organizing information, not a prediction. If you're unsure whether trading suits your situation, consider speaking with a licensed financial professional.

Check current optionsAffiliate link, no extra cost
Go