MT5 Custom Indicators: Install, Build and Troubleshoot

Trader editing an MT5 custom indicator

An MT5 custom indicator is an MQL5 program that calculates and draws market data on your chart. It adds analysis the built-in set doesn’t cover. You get one from the official Code Base or Market, or you build it in MetaEditor. Then you compile it to an .ex5 file in the MQL5/Indicators folder, and it appears in Navigator. This guide covers each step, plus mobile limits, custom timeframes and the errors that stop an indicator from loading.

Mitramarkets
Trade MT5 With Faster Execution
Mitra Markets combines MetaTrader 5 access with low-latency execution and direct access to Tier-1 liquidity for retail traders.
Explore Mitra Markets

TL;DR

  • A custom indicator analyzes and displays data. Per MetaQuotes, it cannot execute trades, unlike an Expert Advisor.
  • Official sources are Code Base (free source code) and Market (ready-made products). Both land the file in Navigator.
  • Files live in MQL5/Indicators. Source is .mq5, and the compiled .ex5 is what runs. Press F7 in MetaEditor and read the Errors tab.
  • MT5 has no free-form custom timeframe. There are 21 fixed ones, and anything else needs a custom symbol or a different chart type.
  • Try every new indicator on a demo account before it touches live money.

Table of Contents

What a custom indicator is and how it differs from a built-in one

MT5 ships with a set of technical-analysis tools. MetaQuotes lists 38 built-in indicators, grouped into trend indicators, oscillators, volume indicators and Bill Williams’ tools. Moving Average, RSI, MACD and Bollinger Bands are all in that set.

Four groups of built-in MT5 indicators

A custom indicator is anything added on top. MetaQuotes says the built-in set can be supplemented with many custom indicators from Code Base and Market. “Custom” therefore means added or separately developed. It doesn’t mean paid or exotic. Many are free.

The platform documentation says a custom indicator is written to execute any algorithm a trader can imagine, and that it cannot execute trading operations. The MQL5 community’s introductory article on custom indicators draws the same line: an indicator provides analysis and does not itself open, modify or close trades.

That separation is useful. An indicator can’t place an order by mistake, so the worst a bad one can do is mislead your reading of the chart. An Expert Advisor is the program type that trades.

Where to find custom indicators

MetaTrader 5 points you to three official routes:

Source What it is Best for
Code Base Free library of source-code applications, including indicators Learning, editing and adapting code
Market Store of ready-made trading applications Installing quickly without touching code
Freelance Order an application from a professional developer A specific idea nobody has built

Code Base downloads are compiled automatically and show up in Navigator. Market products download to the right folder and show up there too. That’s the main reason to start with the built-in routes rather than files from random forums.

What to check before you download

A custom indicator runs code on your machine, so treat it that way.

  1. Source or compiled only. MQL5 separates the readable .mq5 source from the executable .ex5. Compiled-only files are convenient, but you can’t audit or debug them. If you can read the source, you can see what the indicator calculates.
  2. Platform version. MT4 and MT5 indicators are different programs. Check you’re getting the MQL5 version.
  3. Behavior on history. Scroll back on the chart. A good indicator draws the same values on past bars as it did live. If signals seem to appear perfectly at every turning point, be suspicious.
  4. Performance. Heavy indicators on many charts can slow the terminal. Add them one at a time.
  5. Demo first. Run it on a demo account, verify its numbers against a built-in equivalent where one exists, and only then use it on a live chart.

If you’re still deciding which kind of tool fits your style, a primer on swing trade indicators and how to combine them shows how traders pair different readings instead of leaning on a single line.

How to install a custom indicator on MT5 desktop

The process is short once you know where files go.

Option A: Market or Code Base

Open the Market or Code Base tab in the terminal, or download from the MQL5 site while logged in. The terminal places the file for you, and the indicator appears in the Navigator panel under Indicators.

Option B: A file you already have

  1. In MT5, choose File, then Open Data Folder.
  2. Go to MQL5, then Indicators. You can use a subfolder to keep things tidy. MQL5’s reference says a custom indicator must be an EX5 file located in MQL5/Indicators or a subdirectory.
  3. Paste the file. If it’s an .mq5 source, open it in MetaEditor and compile it.
  4. Right-click Navigator and refresh, or restart the terminal.
  5. Drag the indicator from Navigator onto a chart, or use Insert, Indicators, Custom.

On desktop MT5, source files use the .mq5 extension and compiled files use .ex5, and indicators are stored in the MQL5/Indicators folder. Only the .ex5 runs. If you copy a bare .mq5 and nothing happens, that’s why.

Compile it

In MetaEditor, open the main source file and press F7. MetaEditor’s help says compilation converts your code into an executable and tells you to check the Errors tab. With zero errors, the executable can run in the terminal. With errors, no executable is produced, so a missing indicator often means a failed compile.

Mobile and Mac: what to expect

The desktop terminal is where custom indicators are installed and edited. The mobile apps work from the platform’s built-in indicator groups. Android, for example, is described by MetaQuotes as offering 30 indicators in groups such as trend, oscillators and volume. If your whole edge depends on a custom indicator, plan to do the analysis on a desktop chart.

A common workaround is to run the indicator on desktop and let it alert you. Many custom indicators include alert options, so your desktop terminal does the watching while your phone stays a monitoring tool.

On a Mac, the logic is the same: find the terminal’s data folder, put the .ex5 in MQL5/Indicators, and refresh Navigator. Use File, Open Data Folder inside the app rather than hunting for paths, since the location differs by how MT5 was installed.

Mobile and Mac: what to expect

Create and edit your own custom indicator

You don’t need to start from a blank page. MetaEditor has a wizard for it.

  1. In MetaEditor, choose New, then Custom Indicator.
  2. Name it and add input parameters, such as period or color.
  3. Pick whether it draws on the main chart or in a separate window, and set scale limits.
  4. Define its plots.

The MetaEditor wizard creates a template in MQL5/Indicators with an OnInit handler and the mandatory OnCalculate handler. Inputs are declared as input variables, so they appear in the settings dialog when you attach the indicator.

Buffers and plot types

An indicator draws from indicator buffers: arrays holding the values to display. MQL5’s examples show that buffers must be bound with SetIndexBuffer. The same reference lists the plot styles available: lines, segments, histograms, arrows, filled areas, bars and Japanese candlesticks. That range is why one custom indicator can look nothing like another.

A sensible editing routine

  • Copy an existing indicator and change one thing at a time.
  • Compile after every change (F7) and fix errors before moving on.
  • Keep inputs for anything you might tweak, rather than hard-coding numbers.
  • Compare output to a built-in indicator on the same data to confirm your math.
  • Test on demo before you rely on it live.

Configuring an installed indicator

Once on a chart, double-click the indicator or open the chart’s indicator list. The properties dialog lets you change inputs, colors, styles and levels. Save a template once you like a layout so you can apply it to other charts in one click.

Custom timeframes in MT5

Traders often search for a custom timeframe, such as a 7-minute or 23-minute chart. Here is what the platform offers.

MT5 provides 21 chart timeframes from one minute to one month. The official reference lists them: M1, M2, M3, M4, M5, M6, M10, M12, M15, M20, M30, H1, H2, H3, H4, H6, H8, H12, D1, W1 and MN1. That is a much richer menu than MT4 offered, and it covers most needs.

If you need something else, there are two routes, both described in MQL5’s programming guide on symbols and timeframes:

  • A custom symbol for a non-standard duration such as M23. The guide notes that trading from custom symbols doesn’t work exactly like standard charts without modifying Expert Advisors, so it suits analysis more than live execution.
  • Custom indicator rendering for non-time-based views such as Renko or equivolume. The guide recommends drawing styles like DRAW_CANDLES or DRAW_BARS.

In practice: pick the closest standard timeframe first. M12 and M20, for instance, cover many odd-interval needs. Move to custom symbols only when you truly need a different bar length.

Troubleshooting an indicator that won’t show or work

Work through this list in order.

  1. Is it compiled? An .mq5 alone won’t run. Open it in MetaEditor, press F7 and read the Errors tab.
  2. Is it in the right folder? It has to be in MQL5/Indicators or a subfolder. Use File, Open Data Folder to be sure you’re in the right terminal’s directory.
  3. Did Navigator refresh? Right-click and refresh, or restart MT5.
  4. Is it plotting? If the indicator loads but the chart is blank, check that its buffers are bound with SetIndexBuffer and that the display window and scale suit the values.
  5. Is an Expert Advisor calling it? When an EA loads an indicator through iCustom and fails, the call returns INVALID_HANDLE with error 4802. Check the file name, path and that it’s compiled.
  6. Is it the right version? An MT4 indicator won’t run on MT5.

If values look wrong rather than missing, compare against a built-in indicator using the same settings. A mismatch usually points to different input defaults or a different price type.

Our perspective

We built Mitra Markets around the idea that retail traders deserve the tools usually reserved for professionals. Custom indicators are part of that. They let you encode your own read of the market instead of borrowing someone else’s.

The indicator is only half of the picture, though. A signal is worth what you can do with it, and that depends on how fast your order reaches the market. That’s why we run MetaTrader 5 on MitraNet™, our proprietary technology designed for execution under 30 milliseconds, with direct access to Tier-1 liquidity. For scalpers and crypto traders working short timeframes, that speed is where a well-tuned indicator pays off.

Our advice is simple: build or pick an indicator you understand, test it on demo, then trade it on a platform that matches its pace. We designed our conditions, including instant deposits and no minimum deposit, so that nothing stands between the idea and the chart.

Partners

Trade your indicators on MetaTrader 5 with Mitra Markets

If you run custom indicators on desktop MT5, you can do it with us. Our platform supports MetaTrader 5 with advanced charting and algorithmic trading, across forex, commodities, indices and crypto CFDs. See the trading platforms page for how MT5 and MitraNet™ fit together.

Mitramarkets

There is no minimum deposit, and deposits are instant. Our accounts page lists a commission of $7 per lot and the Edge and Standard account types, so you can pick the structure that suits your strategy. Compare our accounts or browse the markets we offer.

Still choosing a platform? Our guide on MT5 versus cTrader walks through the trade-offs.

FAQ

Can a custom indicator place trades for me?

No. MetaQuotes states custom indicators cannot execute trading operations. They analyze and display data. Automated trading needs an Expert Advisor, which can read an indicator’s values and act on them.

Are free MT5 custom indicators safe to use?

The official Code Base is a free library of source-code applications, and downloads are compiled automatically. Since you can read the source, you can check what the indicator does. Whatever the source, run it on a demo account first and confirm its calculations before using it live.

Why doesn’t my indicator appear in Navigator?

Usually it isn’t compiled or sits in the wrong folder. It needs to be an .ex5 file in MQL5/Indicators or a subfolder. Press F7 in MetaEditor, check the Errors tab, then refresh Navigator or restart the terminal.

Can I make a custom timeframe like M7 in MT5?

Not as a normal chart period. MT5 offers 21 fixed timeframes. For a duration outside that list, MQL5 documentation points to a custom symbol. Check first whether M6 or M10 meets your need.

Do custom indicators work on the MT5 mobile app?

Custom indicators are installed on the desktop terminal. The mobile apps use the built-in indicator groups. Run your custom indicator on desktop and use its alerts to keep an eye on the market from your phone.

Sources