what is a custom indicator metatrader

What Is a Custom Indicator in MetaTrader?

A custom indicator in MetaTrader is a user-developed or third-party technical indicator that is not included in the platform’s default set. Standard indicators such as the Relative Strength Index, MACD, Bollinger Bands, and moving averages ship with both MetaTrader 4 and MetaTrader 5. Custom indicators sit alongside these defaults but are added separately, either by writing the code, downloading from a public source, or purchasing from a developer.

Custom indicators are written in MQL4 for MT4 or MQL5 for MT5. They appear in the Navigator panel under “Custom Indicators” once installed and can be applied to charts in the same way as standard indicators. Unlike Expert Advisors, custom indicators do not execute trades. Their function is purely analytical: they calculate values from price data and display them on the chart or in a sub-window.

This article explains what custom indicators do, how they differ from EAs, how MT4 and MT5 custom indicators relate to each other, and what to consider when using third-party indicators.

What Custom Indicators Do

A custom indicator processes price data, and sometimes other inputs, to produce values that are plotted on the chart. The plot can take many forms:

  • Lines overlaid on price (similar to a moving average)
  • Histograms in a sub-window below the main chart (similar to MACD’s histogram)
  • Arrows or shapes on price candles to mark signals
  • Colour bands or zones indicating market conditions
  • Numerical text on the chart showing calculated values

The calculation logic is defined by the indicator’s code. A custom indicator might be a slightly modified version of a standard indicator (for example, a moving average with adjustable smoothing methods), or it might implement a calculation that is not available among the defaults (such as a volatility-adjusted oscillator or a custom volume profile).

Custom indicators run on every tick when attached to a chart. They recalculate their values as new price data arrives and update the plot accordingly. The calculations occur client-side on the trader’s computer, not on the broker’s server, so indicator performance depends on the speed of the trader’s machine and the volume of data being processed.

Custom Indicators Compared to Expert Advisors

Custom indicators and Expert Advisors are both written in MQL but serve different purposes.

A custom indicator analyses and displays information. It does not place, modify, or close trades. Its output is purely visual or numerical.

An Expert Advisor takes action. It reads price data and indicator values, including custom indicator values, and uses them to execute trades automatically.

A trader can use a custom indicator as a manual analysis tool, observing the indicator’s output and making trading decisions manually. Alternatively, an Expert Advisor can be coded to read the custom indicator’s output programmatically and act on it without trader intervention. The indicator generates the signal; the EA acts on it.

This separation matters for installation. Custom indicators go in the MQL4/Indicators or MQL5/Indicators folder. EAs go in the MQL4/Experts or MQL5/Experts folder. They are recognised by the platform as different file types and behave differently when attached to a chart.

MT4 and MT5 Custom Indicators

Custom indicators for MT4 are written in MQL4 and saved as .mq4 (source) or .ex4 (compiled) files. Custom indicators for MT5 are written in MQL5 and saved as .mq5 or .ex5 files.

MQL4 and MQL5 are different languages with different syntax conventions, function libraries, and platform APIs. An MQL4 indicator is not compatible with MT5 and vice versa. A developer who wants to support both platforms typically maintains parallel versions.

This compatibility issue is the same one that applies to EAs, as covered in the MT4 versus MT5 article. The practical implication is that a trader who downloads a custom indicator must check whether the file format matches their platform.

Some custom indicators rely on multiple files. A complex indicator may include an .ex4 file along with .dll libraries, sound files, or configuration files. The full set must be installed for the indicator to function correctly.

Installing and Using a Custom Indicator

The installation procedure for a custom indicator on MT4 is similar to that for an EA:

  1. Obtain the .ex4 or .mq4 file
  2. In MT4, open File → Open Data Folder
  3. Navigate to MQL4 → Indicators
  4. Copy the indicator file into this folder
  5. Refresh the Navigator panel (right-click Custom Indicators, select Refresh) or restart MT4
  6. The indicator appears under Custom Indicators in the Navigator
  7. Drag the indicator onto a chart, or double-click it
  8. Configure the input parameters in the dialog that appears
  9. Click OK to apply

The indicator then displays on the chart according to its plot type. To remove it, right-click the chart, select Indicators List, choose the indicator, and click Delete. Alternatively, right-click directly on an indicator line and select Delete Indicator.

A single chart can have multiple custom indicators applied simultaneously, just as it can have multiple standard indicators. Each runs independently and updates on every tick.

For step-by-step instructions on the general process of adding indicators to MT4, including built-in indicators, the dedicated article covers further details.

Common Sources of Custom Indicators

Custom indicators are available from several places.

MQL5 Market is the official Metaquotes marketplace, accessible from within both MT4 and MT5. It includes free and paid custom indicators. Paid indicators are subject to a review process and the platform handles licensing, though quality varies.

Independent developer websites offer custom indicators for direct download or purchase. These typically come with documentation but are not reviewed by Metaquotes.

Public forums and communities host shared custom indicators contributed by retail traders. ForexFactory, TradingView, and various MetaTrader community sites all maintain libraries of free indicators. Quality is highly variable, and source code is often available for inspection.

Custom development. A trader who can program in MQL4 or MQL5, or who hires a developer, can create indicators tailored to specific calculations. This is the only way to obtain an indicator that does exactly what the trader wants.

Considerations When Using Third-Party Indicators

A few practical points apply to third-party custom indicators.

Code quality varies widely. A poorly written indicator can run slowly, miscalculate values, or even crash the platform under certain conditions. Trying the indicator on a demo account before relying on it in live trading is sensible.

Repainting indicators redraw their historical values when new data arrives, so the signals seen on a current chart may not match what the indicator showed in real time at the historical point. This makes backtest results misleading. Indicators that repaint should be identified and treated cautiously.

Lagging vs leading. Most indicators are lagging, meaning they react to price moves rather than predict them. Some indicators are marketed as leading or non-lagging, but in practice the laws of mathematics generally make this impossible without repainting. Claims that an indicator predicts the future should be evaluated sceptically.

File security. Compiled .ex4 files cannot be read for content. Running an unknown .ex4 file is similar to running any unknown executable on the computer. Source .mq4 files can be reviewed before running.

Dependencies. Some custom indicators depend on external DLL files or other resources. Installing these requires enabling “Allow DLL imports” in the platform settings, which has security implications. Only enable this for trusted indicators from known developers.

Frequently Asked Questions

What is the difference between a built-in indicator and a custom indicator? Built-in indicators are included with MetaTrader by default and cannot be modified. Custom indicators are added by the user, can be edited if the source code is available, and provide functionality not available in the defaults.

Where do custom indicator files go in MT4? Custom indicator files belong in the MQL4/Indicators folder within the MT4 data folder. The data folder is accessed via File → Open Data Folder in MT4.

Can custom indicators place trades? No. Custom indicators only analyse and display data. To act on an indicator’s output automatically, an Expert Advisor must be coded to read the indicator’s values and execute trades. The indicator and EA are separate components.

Are MT4 custom indicators compatible with MT5? No. MT4 uses MQL4 and MT5 uses MQL5. Custom indicators written for one platform must be rewritten in the other’s language to run there. Some developers offer parallel versions.

Do custom indicators work on the MT4 mobile app? No. The mobile and web versions of MT4 do not support custom indicators. They only display built-in indicators. Custom indicators require the desktop platform.

Can a custom indicator slow down my MetaTrader platform? Yes. A poorly optimised indicator that performs heavy calculations on every tick can noticeably slow the platform, particularly when applied to multiple charts. If the platform becomes unresponsive after installing an indicator, removing the indicator and observing whether performance improves is a useful diagnostic.

Are paid custom indicators better than free ones? Not necessarily. Quality varies in both categories. Paid indicators often include support, documentation, and ongoing updates, but the underlying logic is not necessarily superior to free alternatives. Evaluating an indicator on its own merits, ideally on a demo account, is more reliable than judging by price alone.