Home / Custom Indicators
Indicators

How to Install Custom Indicators on MetaTrader 5

By Alex Mercer Updated Apr 1, 2026 12 min read
Table of Contents
  1. Why Use Custom Indicators?
  2. Understanding Indicator File Types
  3. Installing from MQL5 Market
  4. Manual Installation Step-by-Step
  5. Compiling Source Code (.mq5)
  6. Applying Indicators to Charts
  7. Configuring Indicator Parameters
  8. Troubleshooting Common Issues
  9. Best Sources for Custom Indicators

Why Use Custom Indicators?

MetaTrader 5 ships with 38 built-in technical indicators covering trend analysis, oscillators, volume, and Bill Williams indicators. For many traders, these are sufficient. However, custom indicators open up a world of specialized analysis that built-in tools cannot match.

Custom indicators can display multi-timeframe data on a single chart, create composite indicators that combine signals from multiple sources, draw supply and demand zones automatically, show session highs and lows, display pivot points, or implement proprietary calculations found nowhere else.

The MQL5 community has produced thousands of free and paid custom indicators. The MQL5 Code Base alone hosts over 3,000 free indicators, and the MQL5 Market offers thousands more. Learning how to install and manage them is an essential MetaTrader skill.

For a comprehensive look at the built-in indicators, read our MetaTrader indicators guide first.

Understanding Indicator File Types

Before installing any custom indicator, you need to understand the two file formats you will encounter:

File Extension Type Can You Edit It? Ready to Use?
.mq5 Source code Yes, in MetaEditor Needs compiling first
.ex5 Compiled executable No (protected) Yes, ready to use

Some developers distribute only the compiled .ex5 file to protect their intellectual property. Others share the .mq5 source code, allowing you to study, modify, and recompile the indicator. Free indicators from the MQL5 Code Base always include source code.

If you receive both files, you only need the .ex5 file for installation. The .mq5 file is useful only if you want to modify the indicator's behavior or learn from the code.

Installing from MQL5 Market (Easiest Method)

The simplest way to install custom indicators is through the built-in MQL5 Market:

  1. Open MetaTrader 5
  2. In the Navigator panel (Ctrl+N), click the Market tab at the bottom
  3. Use the search bar or browse categories to find an indicator
  4. Click on the indicator to view its description, screenshots, and user reviews
  5. Click "Download" (free) or "Buy" (paid)
  6. The indicator automatically appears in Navigator > Indicators > Market folder

MQL5 Market indicators are verified by MetaQuotes and come with a rating system. Look for indicators with 4+ star ratings and at least 50 downloads for a reasonable quality baseline.

Manual Installation Step-by-Step

If you downloaded an indicator from outside the MQL5 Market (a website, forum, or received from another trader), follow these steps:

Step 1: Locate the MT5 Data Folder

Open MetaTrader 5 and go to File > Open Data Folder. This opens a Windows Explorer (or Finder on Mac) window showing your MT5 data directory. The path is typically something like:

C:\Users\YourName\AppData\Roaming\MetaQuotes\Terminal\[HASH]\MQL5\

Step 2: Copy the File

Navigate to the MQL5\Indicators folder within the data directory. Copy your .ex5 file (or .mq5 file) into this folder. You can create subfolders within Indicators to organize your collection (e.g., Indicators\Trend, Indicators\Oscillators).

Step 3: Refresh the Navigator

Back in MetaTrader 5, right-click on "Indicators" in the Navigator panel and select "Refresh". Your new indicator should now appear in the list. If it does not, restart MT5 completely.

Step 4: Apply to a Chart

Drag the indicator from the Navigator onto any chart, or double-click it while the desired chart is active. A properties dialog will appear where you can configure parameters before the indicator loads.

Compiling Source Code (.mq5 Files)

If you have an .mq5 source file but no .ex5 file, you need to compile it using MetaEditor:

  1. Copy the .mq5 file to the MQL5\Indicators folder
  2. Open MetaEditor by pressing F4 in MetaTrader 5 (or clicking the MetaEditor icon in the toolbar)
  3. In MetaEditor, navigate to the file in the Navigator panel on the left
  4. Double-click the .mq5 file to open it
  5. Press F7 or click Compile in the toolbar
  6. Check the output panel at the bottom for errors

If compilation succeeds (0 errors), an .ex5 file is created automatically in the same folder. The indicator is now ready to use. If there are errors, the source code may need modification or may depend on include files that are missing.

Common compilation errors include missing include files (indicated by "cannot open file" errors), deprecated functions from older MQL5 versions, and type mismatches. For MQL5 programming fundamentals, see our MQL5 basics guide.

Applying Indicators to Charts

There are several ways to apply a custom indicator to a chart:

When applying, a dialog box appears with the indicator's input parameters. Configure them as needed and click OK. The indicator draws on the chart immediately.

Configuring Indicator Parameters

Most custom indicators expose configurable parameters (also called "inputs") that let you adjust their behavior without modifying the code. Common parameters include:

To modify an indicator after it is on the chart, right-click the chart, select Indicators List, choose the indicator, and click Properties. You can also use the keyboard shortcut Ctrl+I to open the indicator list directly.

Trade with Professional Indicators

XM offers MT5 with access to the MQL5 Market and full support for custom indicators on all account types.

Open XM MT5 Account →

Troubleshooting Common Issues

Indicator Not Appearing in Navigator

Verify the file is in the correct folder (MQL5\Indicators), not in Experts, Scripts, or the root MQL5 folder. Right-click "Indicators" in the Navigator and select Refresh. If still missing, restart MT5.

Indicator Loads but Shows Nothing

Check the Experts tab in the Terminal panel (Ctrl+T) for error messages. The indicator may require specific market conditions, a minimum amount of historical data, or may only work on certain instruments or timeframes.

"DLL Calls Not Allowed" Error

Some indicators use external DLL libraries. Go to Tools > Options > Expert Advisors and check "Allow DLL imports." Only do this for indicators you trust, as DLLs can execute arbitrary code on your computer.

Indicator Slows Down MT5

Poorly coded indicators can consume excessive CPU or memory. If MT5 becomes sluggish after adding a custom indicator, remove it and test alternatives. Multiple indicators calculating on every tick can compound the performance impact.

"Wrong Parameters" Error

The indicator may have been compiled with a different version of MT5. Try recompiling the .mq5 source if available, or download the latest version from the original source.

Best Sources for Custom Indicators

Source Free/Paid Quality Control Source Code
MQL5 Market Both MetaQuotes verified Usually compiled only
MQL5 Code Base Free Community reviewed Always included
MQL5 Forum Free Varies widely Usually included
TradingView conversions Varies No verification Varies
GitHub Free No verification Always included

Start with the MQL5 Code Base for free, open-source indicators. Only purchase from the MQL5 Market after verifying reviews and testing the demo version if available.

Full Indicator Support on Exness MT5

Exness offers MT5 accounts with unrestricted custom indicator support, raw spreads, and instant execution.

Open Exness Account →

Frequently Asked Questions

What is the difference between .mq5 and .ex5 indicator files?
An .mq5 file is the source code of an indicator, written in MQL5. You can read and modify it in MetaEditor. An .ex5 file is the compiled (executable) version that MT5 actually runs. If you have an .mq5 file, you need to compile it in MetaEditor first. If you have an .ex5 file, you can use it directly but cannot see or modify the source code.
Can I use MT4 indicators on MT5?
No. MT4 indicators use .ex4 format and MQL4 language, which are incompatible with MT5. An MT4 indicator must be rewritten in MQL5 to work on MetaTrader 5. Many popular MT4 indicators have MT5 versions available on the MQL5 Market or Code Base.
Why is my custom indicator not showing on the chart?
Common causes include: placing the file in the wrong folder (must be in MQL5/Indicators), not refreshing the Navigator panel after installation, the indicator being compiled for a different platform version, or missing dependencies like DLL files. Try restarting MT5 and checking the Experts tab in the terminal for error messages.
Risk Disclaimer

Trading forex and CFDs carries a high level of risk and may not be suitable for all investors. You could lose more than your initial investment. The information on this website is for educational purposes only and does not constitute financial advice.