Indicator guide

MT5 indicators: how to attach, install and compare them

MT5 indicators are calculations drawn on a chart from price and volume data. They show a line, a histogram or a value, and they do not place trades. You attach built-in indicators from the Navigator or the Insert menu, and install a custom one you own or licensed by copying it into the MQL5 Indicators folder.

Trading forex and CFDs involves substantial risk of loss. Automation applies rules; it does not remove trading risk. Read our risk disclosure.

Key takeaways

What MT5 indicators are

An indicator is a program that reads the price history of one symbol on one timeframe and draws the result on that chart, either over the price or in a separate sub-window. The MetaTrader 5 help describes the built-in library as trend indicators, oscillators, volume indicators and Bill Williams' indicators, and notes that a large number of custom indicators can also be used.

Custom indicators are written in MQL5. Their calculation goes into the OnCalculate() function, which the MQL5 reference describes as the place where all the calculations of a custom indicator belong. Nothing in that structure places an order. That is the main difference from an Expert Advisor, which is covered further down.

Concept diagram comparing an indicator, which reads price and draws values on the chart, with an Expert Advisor, which reads price and can send orders. A three-step install path runs from the MQL5 Indicators folder to the Navigator to the chart.
Concept diagram, not an app screenshot.

Built-in indicator groups

The Navigator sorts built-in indicators into groups. The table uses the group names and examples from the MT5 help index. Names can differ slightly between builds, so check the Navigator in your own terminal.

Built-in indicator groups in the MT5 help
GroupWhat it is for (help wording, shortened)Examples listed in the help
Trend IndicatorsDetect trends. Inefficient in flat markets.Moving averages, Average Directional Movement Index (Wilder)
OscillatorsShow price deviation from an average. Best suited to ranging markets.Relative Strength Index, MACD
Volume IndicatorsCalculated from volume. On forex, volume means the number of ticks.On Balance Volume
Bill Williams' IndicatorsGrouped separately because they belong to his trading system.Alligator, Awesome Oscillator

Source: MT5 help, Technical Indicators and the group pages. Being in a group does not make an indicator suitable for any strategy.

How to attach a built-in indicator

  1. Open the chart you want. Double-click the symbol in Market Watch if it is not already open.
  2. Drag the indicator from the Navigator onto the chart. You can also choose Insert → Indicators and pick it from the list.
  3. In the dialog that opens, set the parameters, such as the period for a moving average, then press OK.
  4. Check the chart. Trend and oscillator indicators appear either over the price or in a sub-window below it.

Use one indicator per question at first. Stacking five indicators that all measure momentum adds clutter without adding information, and it makes it harder to see what each line is doing.

Installing a custom MT5 indicator

Install only indicators you wrote, bought or licensed. Do not use copies of paid products that have been shared without a licence, and do not install files of unknown origin, because they can contain harmful code. The steps below assume you hold the file legally.

  1. In MT5, choose File → Open Data Folder. The help spells the command "Open data folder". Use it instead of guessing a path, because the location differs between installs.
  2. Open the MQL5 folder, then Indicators.
  3. Copy the compiled .ex5 file into Indicators. If you only have the .mq5 source, open it in MetaEditor and press F7 to compile. Compilation results appear on the Errors tab of the Toolbox.
  4. Restart the terminal or refresh the Navigator. The indicator should appear in the Navigator list. Drag it onto a chart.
File → Open Data FolderMQL5 → Indicators → copy the .ex5 (or compile the .mq5 with F7)Navigator (refresh or restart) → drag onto chart

Indicators bought from the MQL5 Market are installed through the terminal, not by copying files by hand. The MT5 help has a Market section that covers the purchase and installation process.

Editing inputs and removing an indicator

Changing an indicator after it is on the chart is a normal part of testing it. Open the Indicator List, select the indicator and click Properties, or right-click the indicator on the chart. The menu names come from the MT5 help, and they can vary by build.

Each change is a new configuration. If you tune the inputs until a past chart looks good, you have fitted the indicator to that history, and it will look less impressive on data it has not seen.

MT5 indicators compared with Expert Advisors

People often mix up the two. An indicator reads data and draws it. An Expert Advisor reads data, runs logic and can send trade requests. The table shows the practical differences.

Indicator and Expert Advisor, side by side
QuestionIndicatorExpert Advisor
Main jobCalculates and draws values on the chartRuns trading logic and can place, change or close orders
Main entry pointOnCalculate()OnTick(), with OnInit() and OnDeinit()
Places ordersNoYes, if its code includes trading logic
Needs Algo Trading (AutoTrading in some versions) enabledNot applicableYes, for automated trading
Strategy TesterVisual mode can show how it behavesBacktest and optimise, with forward testing options
Typical mistakeReading a repainting line as a confirmed signalGoing live before a demo test

An EA can read an indicator. A common design calls the indicator from the EA and uses its values as one input among others. Each of those inputs still needs a test of its own before the combined logic is trusted. For how the testing works, see the Expert Advisor Tester guide.

Limits: lag, repainting and data

Testing is the step that separates a tool you understand from one you have only looked at. Use the Strategy Tester and a forward demo period, and keep a written record of what you expected and what happened. The how to verify a trading bot guide covers what backtests, forward tests and live records can and cannot show. A simple trading journal helps keep that record.

YO4X is a Windows desktop workspace for supported MetaTrader 5 strategies, bot configuration and trading journals. It does not execute EX5 files or arbitrary uploaded code, so custom indicators are installed and run inside MT5 itself. For the YO4X Windows app, see the download page.

Frequently asked questions

Can an MT5 indicator place trades?

No. A standard indicator calculates values and draws them on the chart. Trading logic belongs in an Expert Advisor, which can send orders when its code and settings allow it. An EA can read an indicator's values, but the indicator itself does not trade.

Why does my custom indicator not appear after I copied it?

Check that you copied the compiled .ex5 file, or compiled the .mq5 source in MetaEditor with F7, into the MQL5 Indicators folder of your data folder. Then restart the terminal or refresh the Navigator. If it still does not appear, check the Errors tab for compile messages and the Experts and Journal tabs in the Toolbox.

Why does an indicator change after the candle closes?

The indicator is repainting. Its value on the current, unfinished bar updates with each tick, and some indicators also redraw earlier values when new data arrives. Before relying on an indicator, watch it live on demo and compare what it showed on open bars with what remained after they closed.

Does a good-looking indicator on past charts mean it will make money?

No. A chart is a record of what happened, and a tool fitted to it may describe that history without predicting the next move. Backtests and demo results are evidence about behaviour. They are not proof of live results, and no indicator can promise a result.

Can I install an indicator someone shared for free?

Only if you know the author and have the right to use the file. Use indicators you wrote, bought or licensed. Copies of paid products shared without a licence are not yours to use, and an unknown file can contain harmful code, so treat unsolicited files with caution.

Keep reading

Sources: Technical Indicators - MetaTrader 5 Help · Files and Folders - For Advanced Users - MetaTrader 5 Help · Compilation - Developing programs - MetaEditor Help · Custom Indicators - MQL5 Reference

Trading forex and CFDs involves substantial risk of loss. Past performance and backtests do not guarantee future results. Read our risk disclosure before you trade.