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:
- Open MetaTrader 5
- In the Navigator panel (Ctrl+N), click the Market tab at the bottom
- Use the search bar or browse categories to find an indicator
- Click on the indicator to view its description, screenshots, and user reviews
- Click "Download" (free) or "Buy" (paid)
- 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:
- Copy the .mq5 file to the
MQL5\Indicatorsfolder - Open MetaEditor by pressing F4 in MetaTrader 5 (or clicking the MetaEditor icon in the toolbar)
- In MetaEditor, navigate to the file in the Navigator panel on the left
- Double-click the .mq5 file to open it
- Press F7 or click Compile in the toolbar
- 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:
- Drag and drop: Drag the indicator from the Navigator panel directly onto the chart
- Double-click: Select the target chart first, then double-click the indicator in the Navigator
- Right-click menu: Right-click the indicator in the Navigator and select "Attach to a Chart"
- Insert menu: Go to Insert > Indicators > Custom and browse your installed indicators
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:
- Period/Length: The lookback window for calculations (e.g., 14-period RSI, 50-period moving average)
- Colors and styles: Line colors, widths, and drawing styles
- Alert settings: Enable/disable sound or visual alerts when conditions are met
- Applied price: Which price to use for calculations (close, open, high, low, median, typical, weighted)
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 →