MT5 installation guide · Custom indicator

How to Install and Set Up an Indicator in MT5

Add a custom indicator to MetaTrader 5, change its inputs and check that the chart matches the intended calculation. This guide uses the free TF ATR Risk Bands 1.00 indicator on MT5 desktop for Windows.

Updated 8 September 2026 · 7 min read · Source and platform documentation checked

PlatformMT5 · Windows desktop
ExampleTF ATR Risk Bands 1.00
Start withA demo account
Trading permissionAlgo Trading not required

Before you start

Use a connected MT5 desktop terminal and a demo chart for the walkthrough. A custom MT5 indicator uses an EX5 file; an MT4 EX4 file is incompatible. The MT5 mobile apps and web terminal do not use this desktop file-installation workflow. If you already have a compatible demo account, you can use it without opening another account.

1. Download and extract the ZIP

Save the ZIP and choose Extract All in Windows. The package contains:

File Purpose
TF_ATR_Risk_Bands.ex5 Compiled indicator, ready for MT5
TF_ATR_Risk_Bands.mq5 Readable source code
README-TF-ATR-Risk-Bands.md Indicator instructions
CHECKSUMS-TF-ATR-Risk-Bands.txt File integrity reference

The EX5 is sufficient to run the supplied build. Keep the source and documentation if you want to inspect how the lines are calculated.

2. Copy the indicator to MT5

In the terminal you use, choose File → Open Data Folder. Open MQL5 → Indicators. You may create a TradeForex subfolder. Copy the EX5 there, with the MQ5 alongside it if wanted:

MT5 data folder
└── MQL5
    └── Indicators
        └── TradeForex
            ├── TF_ATR_Risk_Bands.ex5
            └── TF_ATR_Risk_Bands.mq5

For other packages, preserve any documented dependencies: .mqh include files belong under MQL5/Include using the supplied folder structure. ATR Risk Bands has no extra include-folder requirement. Do not move an indicator into Experts; that folder is for EAs. MetaQuotes’ file locations.

3. Refresh Navigator and attach the indicator

Open View → Navigator, right-click the Indicators section and select Refresh. Find TF_ATR_Risk_Bands inside your chosen subfolder. If necessary, restart the correct MT5 terminal.

Open an EURUSD demo chart and select H1 for this example. Drag the indicator onto the chart. It uses the chart’s symbol and timeframe, so switching from H1 to H4 changes the data used for the calculation. H1 is a tutorial setting, not a claim that it is the most profitable timeframe.

If you prefer to rebuild the source, open the MQ5 in MetaEditor and compile it with F7. The supplied EX5 does not require this extra step.

4. Set the three inputs

In the indicator properties window, open Inputs and begin with the supplied defaults:

Input Default Valid setting Effect
ATRPeriod 14 An integer of at least 2 Number of bars used by the ATR calculation
StopATR 2.0 Greater than zero Distance of the two inner reference lines
TargetATR 4.0 Greater than StopATR Distance of the two outer reference lines

For example, StopATR=2.0 and TargetATR=1.0 is invalid and prevents initialization. The values come from the supplied source. They are display settings, not tested entry, exit or profitability recommendations.

Click OK. This indicator needs neither DLL imports nor WebRequest access. Leave the Algo Trading toolbar switch off if you are only following this indicator tutorial.

5. Understand the four lines

The source calculates the lines from each bar’s close and that bar’s ATR value:

Line Default formula Default appearance
Upper target reference Close + 4 × ATR Green, dotted
Upper stop reference Close + 2 × ATR Gold, dashed
Lower stop reference Close − 2 × ATR Gold, dashed
Lower target reference Close − 4 × ATR Green, dotted

The names describe distances. They do not instruct you to buy, sell, or place an order at those prices. The lines move with each candle’s close and volatility; they are not fixed to your actual entry price and do not trail a real broker order.

For an illustrative completed candle with close 1.10000 and ATR 0.00100, the default lines are 1.10400, 1.10200, 1.09800 and 1.09600, from top to bottom. On usual EURUSD pricing, the inner distance is 20 pips and the outer distance is 40 pips. These are hypothetical calculation inputs, not current market prices.

6. Verify the display

Open View → Data Window and point at a completed candle. Look for the four named indicator values. If you also add MT5’s standard Average True Range with period 14, you can compare the ATR value with the distance from that candle’s close to each line.

The current, unfinished candle is bar 0. Its close and ATR can change with incoming prices, so its reference bands can move. Use a completed candle for a stable arithmetic check; revised broker history can still change historical calculations.

If no bands appear, let history synchronize. The source waits for at least ATRPeriod + 2 bars and sufficient ATR buffer data. Very old bars without enough history may remain empty. MetaQuotes’ indicator controls.

7. Adjust the appearance and save your setup

Right-click the chart, open Indicators List, select TF ATR Risk Bands (14), and choose Properties. Use Inputs for the calculation and Colors for line colour, style and width. Choose colours that remain visible on your chart background.

Use the chart’s Templates → Save Template command to save the chart setup under a descriptive name such as ATR-Risk-Study. Applying a template can replace the chart’s existing setup, so save anything you need before applying another one. MetaQuotes’ chart templates.

8. Turn a reference distance into a risk calculation

A visible band is only one input to a trade plan. First define the entry and invalidation level using your own documented rules. Then calculate the distance from the proposed entry to the actual stop and use the position-size calculator to estimate monetary exposure.

For arithmetic only: a USD 10,000 account with a 0.25% risk budget allows USD 25 before costs. A 20-pip stop with a USD 10 pip value per standard lot implies 25 / (20 × 10) = 0.125 standard lots before costs. With a 0.01 lot step, round down to 0.12 and reduce further if needed for costs. Confirm the symbol’s actual pip value, contract size, minimum lot and trading costs. This example does not specify a trade to take.

Troubleshooting

Symptom What to check
Indicator absent from Navigator Correct data folder; extracted EX5; MQL5/Indicators; refresh or restart
Loading fails ATRPeriod ≥ 2, StopATR > 0, and TargetATR > StopATR; inspect the platform logs
No lines on the chart History and ATR data available; visible line colours; indicator listed on this chart
Current values keep changing Normal for the unfinished candle; inspect a completed candle instead
Values differ after changing timeframe Expected: this indicator follows the chart timeframe
Nothing trades automatically Expected: the indicator only draws reference lines

To remove it, open Indicators List, select the indicator and choose Delete. Removing ATR Risk Bands only removes its display; it cannot close or change positions because it has no trading function.

Continue with the right tool

Read the ATR explanation and worked examples or browse the full indicator library. For software that can place orders, follow the separate EA installation and activation guide.

If you need a compatible demo platform, compare broker eligibility, platforms and costs. The download is free and does not depend on using a referral link. Broker reviews may contain marked affiliate links from which we can receive a commission.

Checked 8 September 2026 against the downloadable source and official platform documentation. Display calculations and installation checks do not establish a profitable trading strategy.