start learning →
beginner11 min read

MetaTrader 5 indicators: adding, configuring, templates and custom indicator safety

How to add and configure indicators in MT5, save a clean chart setup as a template, install custom indicators properly, and avoid the security and repainting traps that come with downloaded code.

key takeaways
  1. MT5 comes with 38 built-in technical indicators, added from the Insert menu or by dragging from the Navigator window onto a chart.
  2. Every indicator has inputs (such as the period and the price it is applied to), levels and visualisation settings; the defaults are a starting point, not a recommendation.
  3. Templates save a whole chart setup, and a template named default is applied to every new chart you open.
  4. Custom indicators are files placed in the MQL5 Indicators folder; compiled files cannot be inspected, so only install them from sources you trust and never allow DLL imports casually.
  5. Some custom indicators repaint, changing past signals after the fact, which makes their history look far better than live use.

To add an indicator in MetaTrader 5, open the Insert menu, choose Indicators and pick one from the categories, or drag it from the Navigator window onto the chart. A settings window opens where you set its inputs, levels and colours; click OK and it is drawn on the price chart or in a separate window below it. Once a chart looks the way you want, save it as a template so you never have to set it up again.

That is the easy part. The parts that cause real problems are configuration that nobody questions, charts so crowded they say nothing, and custom indicators downloaded from unknown sources. This guide covers the mechanics and then those traps.

What comes built in

MT5 includes 38 built-in technical indicators and 44 analytical objects (lines, channels, Fibonacci and Gann tools and so on), and it supports 21 timeframes. The indicators are grouped into four folders in the Navigator and the Insert menu:

  • Trend: moving averages, Bollinger Bands, Parabolic SAR, Ichimoku, Average Directional Index, envelopes and others.
  • Oscillators: RSI, MACD, stochastic, ATR, CCI, momentum, Williams' %R and others.
  • Volumes: indicators built on volume, which in spot forex means tick volume rather than traded volume.
  • Bill Williams: the Alligator, fractals, the Awesome Oscillator and related tools.

If you are new to what these measure, our guides to moving averages and trend following, RSI and MACD, the ATR indicator and Bollinger Bands explain the maths and the limits. This guide is about using them in the platform.

Adding an indicator

There are three ways, all of which open the same settings window:

  1. Insert menu: Insert, Indicators, then the category and the indicator.
  2. Navigator: open it with Ctrl+N, expand Indicators, then double-click an indicator or drag it onto the chart.
  3. Toolbar: the indicators button on the toolbar opens the same list.

Indicators that share the price scale, such as moving averages and Bollinger Bands, are drawn on the price chart. Oscillators with their own scale, such as RSI and MACD, open in a separate subwindow below the chart.

The settings window, tab by tab

Parameters (inputs)

This is where the indicator's calculation is defined. For a moving average, for example:

  • Period: how many bars are averaged.
  • Shift: moves the line forward or backward by a number of bars. Most traders leave it at zero.
  • MA method: simple, exponential, smoothed or linear weighted.
  • Apply to: the price used: close, open, high, low, median, typical or weighted, or, when you drop the indicator onto another indicator, that indicator's values.

Other indicators have their own inputs (an RSI has a period and an applied price; Bollinger Bands have a period, a deviation and a shift). The default values, such as 14 for RSI, are conventions from the indicators' original authors, not settings that have been shown to work best on any particular market.

Levels

Horizontal lines drawn in the indicator's window, such as 70 and 30 on RSI or 80 and 20 on the stochastic. You can add, remove and recolour them. They are reference lines only; price does not respect them.

Visualisation

Controls which timeframes show the indicator. Useful if an indicator only makes sense on certain charts, such as a daily pivot on intraday timeframes.

Colours

Line colours, widths and styles. Choose colours that stay readable in both the chart's background and when printed or screenshotted for a trading journal.

Editing and removing indicators

To change an indicator later, double-click its line, or right-click on the chart and open the Indicators List (Ctrl+I). The list shows every indicator on the chart by window; select one and click Edit or Delete. Removing an oscillator removes its subwindow too.

Applying one indicator to another

MT5 lets you calculate an indicator from another indicator's values rather than price. Drag the second indicator from the Navigator onto the first one's line or window. In the Apply to field you will see options such as the previous indicator's data or the first indicator's data.

A common example is a moving average of RSI: drag a moving average onto the RSI window and apply it to the previous indicator's data. The result is a smoothed RSI line that some traders use as a signal line. The technique is flexible, but every layer of smoothing adds lag, and combining indicators that are built from the same prices does not add independent information.

Templates and profiles

Saving a template

Once a chart is set up the way you want, right-click the chart, choose Templates, then Save Template, and give it a name. A template stores the indicators with their settings, the chart colours and type, and objects such as lines. To apply it to another chart, right-click, Templates, and pick it from the list.

If you save a template with the name default, MT5 applies it automatically to every new chart you open. That is the quickest way to make your standard setup appear everywhere, and also the quickest way to accidentally put a cluttered setup everywhere.

Templates are saved as files in the templates folder of the terminal's data directory (File, Open Data Folder). Back them up; if you move to a new computer or a different broker's MT5, you can copy them across.

Profiles

A profile saves a whole workspace: which charts are open, their symbols, timeframes and templates. Use the File menu or the profiles button to save and switch profiles. Many traders keep one profile for analysis and a separate, simpler one for managing open trades.

Worked example: building a clean daily template

An illustrative setup for a trader who follows the trend on daily charts and sizes positions from volatility:

  1. Open a daily EUR/USD chart and remove any default indicators.
  2. Add a 50-period exponential moving average and a 200-period simple moving average, applied to the close, in two distinct colours.
  3. Add ATR with a period of 14 in a subwindow.
  4. Add RSI with a period of 14 and keep levels at 70 and 30, in a second subwindow.
  5. Save the template as daily-trend.

Now suppose the ATR window reads 0.0065, which is 65 pips (an illustrative value). The trader's rule is a stop 1.5 ATR from entry: 65 × 1.5 = 97.5 pips. With a $10,000 account risking 1% ($100) and a pip value of $10 per standard lot on EUR/USD, the position size is $100 ÷ (97.5 × $10) = 0.1026 lots, rounded down to 0.10 lots. The template makes the input visible on every chart; the position size calculator or our position sizing guide does the rest. The point of the template is that the same information is in the same place every time, which makes decisions more consistent.

Custom indicators: installing them properly

Beyond the built-in set, there are thousands of custom indicators: free ones in the MQL5 Code Base, paid and rental ones in the MetaTrader Market, and many more distributed on forums and websites. They come in two forms:

  • .mq5 files are source code. You can read them in MetaEditor (the coding editor that comes with MT5) and compile them yourself.
  • .ex5 files are compiled programs. You cannot read what they do.

Installing a file manually

  1. In MT5, choose File, then Open Data Folder.
  2. Open the MQL5 folder, then the Indicators folder.
  3. Copy the .mq5 or .ex5 file into it (or into a subfolder you create).
  4. Back in MT5, right-click Indicators in the Navigator and choose Refresh, or restart the terminal.
  5. The indicator now appears in the Navigator and can be added like any other.

Items bought or downloaded through the Market or Code Base tabs inside the terminal are installed automatically.

Custom indicator safety

An indicator is a program running inside the terminal that is logged in to your trading account. Most are harmless, but a few precautions matter.

  • Prefer source code you can read, or code from the platform's own Code Base and Market, which have their own review and reputation systems. A compiled .ex5 file from an unknown website could contain anything the language allows.
  • Be cautious with DLL imports. MQL5 programs can call external Windows libraries (DLLs), which can do almost anything on your computer. MT5 has a setting to allow DLL imports (under Tools, Options, Expert Advisors, and per program when you attach it). Leave it off unless you know exactly why a specific program needs it and you trust the source.
  • Watch for WebRequest permissions. Programs need explicit permission to contact web addresses. If an indicator asks for internet access it has no obvious reason to need, do not grant it.
  • Remember the difference between indicators and EAs. Indicators analyse and draw; they cannot place trades in normal use. Expert Advisors can trade. Our guide to Expert Advisors and trading bots covers the extra risks.
  • Be sceptical of paid indicators sold with performance claims. The same red flags as in our guide to forex scam red flags apply: screenshots instead of verifiable records, urgency, and promises of high win rates.

Repainting: the indicator that rewrites history

Some indicators recalculate past values when new data arrives. An arrow that appeared on a bar can move or vanish a few bars later, and a signal that looked perfect in hindsight was never visible at that point in real time. Typical culprits are indicators that use future bars in their calculation (some zigzag and swing-point tools do this by design) or that re-centre themselves as data comes in.

Worked example: spotting a repainting indicator

Illustrative check. A downloaded arrow indicator shows 40 buy and sell arrows on the last three months of a 1-hour chart, and nearly every arrow sits at a turning point. To test it:

  1. Attach it to a 1-minute or 5-minute chart and take a screenshot.
  2. Wait an hour and take another screenshot of the same period.
  3. Compare. If arrows have moved, appeared or disappeared on bars that were already closed, it repaints.

Alternatively, run it in the MT5 Strategy Tester in visual mode and watch arrows appear as bars form. A repainting indicator's historical record tells you nothing about how it would have traded.

Keeping charts useful

  • Pick one tool per job. One trend tool, one volatility measure, perhaps one momentum oscillator. RSI, the stochastic and CCI together mostly say the same thing three times.
  • Know why each indicator is there. If you cannot say what decision it changes, remove it.
  • Keep settings consistent across the charts you compare, which is what templates are for.
  • Test changes before adopting them. Switching a moving average from 50 to 40 because the last few trades would have been better is fitting to noise, as our guide on how to backtest a strategy explains.

Indicators across timeframes

An indicator's period is counted in bars, so the same setting means very different things on different charts. A 14-period ATR on a daily chart measures roughly the last three trading weeks; on a 15-minute chart it measures the last three and a half hours. If you switch timeframe on a chart with a template applied, the indicators recalculate on the new bars, which is usually what you want but can be confusing if you expect a level you saw on the daily chart to appear unchanged on the hourly one.

There are two common ways to bring a higher-timeframe reading onto a lower-timeframe chart:

  • Scale the period. A 50-period moving average on a 4-hour chart is roughly comparable to a 200-period one on a 1-hour chart, since four 1-hour bars make one 4-hour bar. It is an approximation, because the averages are built from different sets of closing prices.
  • Use a separate chart. Open the higher timeframe in its own window and tile the charts (Window, Tile Windows). This is simpler and avoids custom multi-timeframe indicators, some of which repaint for the reasons described above.

Our guide to multiple timeframe analysis covers how traders combine timeframes without letting the lower one override the plan made on the higher one.

Indicators on MT5 mobile and web

The MT5 mobile apps and web terminal include a smaller set of indicators, and they do not support custom indicators or Expert Advisors in the same way as the desktop terminal. Templates are stored locally on the desktop, so a setup on your computer does not automatically appear on your phone. If you analyse on more than one device, keep a written note of your settings so you can rebuild them.

Common mistakes

  • Treating default settings as tested. A default period is a convention, not evidence.
  • Saving a cluttered default template that then appears on every new chart.
  • Installing compiled indicators from unknown sites and allowing DLL imports to make them work.
  • Trusting repainting arrows, or any indicator whose signals look too good on past data.
  • Stacking similar indicators and treating agreement between them as confirmation.
  • Forgetting that volume in forex is tick volume, a count of price changes, not traded size.

Frequently asked questions

How do I add an indicator in MetaTrader 5?

Use Insert, Indicators and choose one from the categories, or drag it from the Navigator window onto a chart. Set its inputs, levels and colours in the window that opens and click OK.

How do I save indicators so they appear on every chart?

Set up a chart, right-click, choose Templates, Save Template, and name it default. MT5 applies the default template to every new chart. Save other setups under their own names and apply them from the same menu.

Where do I put custom indicators in MT5?

In the MQL5 Indicators folder of the data directory, which you can open with File, Open Data Folder. Then refresh the Navigator or restart the terminal.

Are custom MT5 indicators safe?

Most are harmless, but compiled files cannot be inspected and DLL imports give a program wide access to your computer. Prefer source code or the platform's own Code Base and Market, and keep DLL imports switched off unless you have a specific, trusted reason.

Can I use MT4 indicators in MT5?

Not directly. MT4 indicators are written in MQL4 and compiled as .ex4 files, which MT5 cannot run. Many popular indicators have MT5 versions, and source code can be converted, but it is not automatic. Our comparison of MetaTrader 4 vs MetaTrader 5 covers the other differences.

Why does my indicator look different on another platform?

Different data feeds, different default settings, or slightly different formulas (for example how the first values of an exponential average are seeded). Compare the inputs first, then the data source.

Not investment advice. This is general information and education, written without knowledge of your circumstances. It is not a recommendation to buy or sell any instrument. Past performance is not a reliable indicator of future results. Trading leveraged products carries a high risk of losing money. Risk warning