MT5 Indicators: How to Add and Install Custom Indicators

MT5 indicators are price calculations MetaTrader 5 draws on a chart; some ship built in, and custom ones come from the MQL5 Market, Code Base or your own code. Market and Code Base downloads install themselves, while any other file goes in the MQL5 Indicators folder of the data folder.

Module 14 · Lesson 3 of 5

What you'll learn

New to the platform? Start with how to use MetaTrader 5.

What are MT5 indicators?

MT5 indicators are calculations on a symbol's price, and sometimes its volume, that MetaTrader 5 draws on a chart or in a window below it. MetaQuotes describes an indicator as a mathematical transformation of price. Some ship with the platform; others are custom programs you add yourself.

The built-in indicators sit in the Navigator window, sorted into groups:

Navigator group What the indicators describe Examples
Trend Direction of price over a period Moving Average, Bollinger Bands
Oscillators Speed of recent moves and how stretched they are RSI, Stochastic, MACD, ATR
Volumes Activity behind price moves Volumes, On Balance Volume
Bill Williams Bill Williams' own set of tools Alligator, Fractals

If these are new to you, the moving averages lesson and the RSI and stochastic lesson explain how two of them are built.

What is a custom indicator?

A custom indicator is any indicator that does not ship with MetaTrader 5, written in the MQL5 programming language. Many draw things the built-in set does not, such as session ranges or zones like order blocks and fair value gaps. Underneath, most are still calculations on the same candles you can already see.

Where do MQL5 indicators come from?

MQL5 indicators come from four places: the built-in set, the MQL5 Market, the free Code Base, or code you write yourself in MetaEditor. MetaQuotes' help on where to find indicators says a Market purchase "is activated and downloaded to the appropriate folder", and Code Base downloads arrive as source code that is compiled for you automatically.

Source Can you read the code? Cost Who checks it What to check
Built-in No, but each is documented in MT5 help Free MetaQuotes What it measures
MQL5 Market No, compiled files only Free, rent or buy Automatic pre-test and seller ID checks Whether it adds a new calculation or renames a familiar one
Code Base Yes, full source code Free You, by reading the source Code quality
Your own code Yes Your time You Your own bugs

The Market rules say products come "only as a compiled file" and pass an automatic formal test. A file shared privately has had no check, so read its source or run it on demo before you rely on it.

What are .mq5 and .ex5 files?

A .mq5 file is an indicator's readable source code; an .ex5 file is the compiled program MetaTrader 5 actually runs. Compiling a .mq5 file creates an .ex5 with the same name, and MetaQuotes' MQL5 book says the Navigator displays the .ex5 files in the MQL5 folder and its subfolders. An uncompiled source file will not appear.

How do you install custom indicators in MT5?

To install a custom indicator from the Market or Code Base, download it inside MetaTrader 5 and it installs itself; for any other file, copy it into the MQL5 Indicators folder of the data folder. MetaQuotes' guide to the platform's files and folders lists Indicators inside the MQL5 folder.

For a file you obtained elsewhere:

  1. In MetaTrader 5, choose File, then Open Data Folder.
  2. Open the MQL5 folder, then the Indicators folder.
  3. Copy the .ex5 file (or the .mq5 source file) into Indicators.
  4. If you only have a .mq5 file, open it in MetaEditor and compile it with F7. The .ex5 is created in the same folder.
  5. Back in MetaTrader 5, find it under Indicators in the Navigator window. If it is missing, restart MetaTrader 5 so the Navigator reloads its list.

How do you add indicators to an MT5 chart?

To add an indicator, drag it from the Navigator onto a chart, set its inputs in the window that opens, and click OK. You can also use the Insert menu. MetaQuotes notes you can change the parameters later, and that the number of indicators on one chart is not limited.

Inputs are the settings a programmer lets you change, such as the period, and a set can be saved to the Presets folder. The same window has a Levels tab for reference lines and a Visualization tab that picks the timeframes where the indicator shows. To remove one, right-click it on the chart and choose Delete Indicator. Once the chart looks right, save it as a template; the steps are in the MT5 templates and profiles lesson.

What is a repainting indicator?

A repainting indicator is one that changes or removes readings on candles that have already closed, once newer candles arrive. Live, you see one signal; later, another replaces it. Scrolling back, every marker looks perfectly placed, so the indicator seems more accurate than it really was.

It usually happens when a calculation uses candles to the right of the one it marks. The source code would show this; a compiled file hides it.

Worked example: a marker that moves

A custom indicator marks a swing low at 1.0850 on a 15-minute chart of the EURUSD currency pair. Suppose a trader buys 0.10 lot at 1.0880 and places the stop at the marked low. At 0.10 lot, EURUSD is worth about $1 per pip. Four candles later the price dips further, and the indicator erases its marker and redraws it at 1.0830.

First reading (seen live) Final reading (what history shows)
Marked low 1.0850 1.0830
Entry 1.0880 1.0880
Stop distance 30 pips 50 pips
Risk at $1 per pip $30 $50

The difference is 20 pips × $1 per pip = $20 of risk on one trade. The price also fell through 1.0850 on its way to 1.0830, so the live stop closed the trade, while history shows a marker sitting neatly at the low. The pip value calculator runs this arithmetic for other pairs and sizes.

Why can more indicators add less information?

Indicators built from the same candles tend to move together, so adding one often adds a calculation, not new information. A chart with five momentum tools can feel like five confirmations when it is one reading counted five times. The using multiple indicators lesson shows how to give each indicator a different job.

Synthetic price chart with RSI 14 and Stochastic %K 14 beneath it, gold bands marking the 30 bars where both read overbought
  1. One synthetic price series of 140 bars, between 1.0850 and 1.0950.
  2. RSI (14) in navy and Stochastic %K (14) in blue, from the same bars.
  3. Gold bands mark each bar where RSI is above 70 and %K is above 80 at the same time.
  4. Across the bars where both have a value: RSI above 70 on 33, %K above 80 on 47, both on 30. That is 30 of 33, about 91%.

Traders often read these levels as overbought, but when that reading turns out wrong, both indicators are wrong together. Before installing a new indicator, ask what data goes into it. If it is the same candles, it may only repeat what you already have.

How do you check a custom indicator before relying on it?

You check a custom indicator by reading its source code where you can, watching whether its readings on closed candles change, and leaving Allow DLL imports off unless you know why it needs one. A compiled .ex5 file cannot be read, so for those files a repaint check on a demo chart shows you how the indicator really behaves.

A DLL is an external Windows library that a program can call to do things MQL5 alone cannot. MetaTrader 5 has an Allow DLL imports option for this, and MetaQuotes advises enabling it only when you are sure the application is safe, because programs from unknown sources can cause damage through third-party DLLs. The Market rules ban DLL calls in its products, so an indicator that asks for DLL access comes from outside the Market.

Your own demo check shows how an indicator behaves live, which a description or screenshot cannot. A program that also opens trades is an Expert Advisor, covered earlier in this module.

Try it on demo

On a demo account in MetaTrader 5, download one free indicator from the Code Base tab, confirm it appears in the Navigator, and attach it to a chart. Note its readings on five closed candles, then check them an hour later to see whether any changed.

This lesson is part of the Algorithmic Trading in MT5 module.

—
—
—

—
—

—
—
—
—
—
—

1.10000

Quick check

  1. Which file type does the MetaTrader 5 Navigator list as a ready-to-run indicator?
  2. Products sold in the MQL5 Market are supplied as
  3. A repainting indicator is one that
  4. A marked level moves from 1.0850 to 1.0830 on 0.10 lot of EURUSD at $1 per pip. The difference in risk is
  5. When should you tick Allow DLL imports for an indicator?

Frequently asked questions

Why is my custom indicator not showing in MT5?

Usually because MetaTrader 5 finds no compiled file in the right place. Check that the file is an .ex5 (or compile the .mq5 in MetaEditor with F7) and that it sits in MQL5, Indicators inside the data folder.

Are MT5 indicators free?

The built-in indicators are free, and the Code Base offers free indicators with full source code. MQL5 Market products can be free, rented or bought, and arrive as compiled files you cannot read.

How do you add indicators on the MT5 mobile app?

On Android, tap the Indicators button on the chart and pick one from the list; on iPhone, tap the chart's top bar. MetaQuotes' Android app help lists 30 built-in indicators and describes no way to add custom ones, so install MQL5 indicators in the desktop platform.

How do I remove an indicator from an MT5 chart?

Right-click the indicator on the chart and choose Delete Indicator. If it also appears in a saved template, re-save that template without it, as shown in the MT5 templates and profiles lesson.

Sources

Practise what you learned

Open an account to use MetaTrader 5. Start on a demo account before risking real money.

Open Account