MetaTrader 5 ships with a comprehensive library of built-in technical indicators, moving averages, oscillators, volume tools, and Bill Williams indicators, among others. For many traders, these standard indicators are sufficient. However, as your analytical approach develops and your strategies become more refined, you may find that the built-in indicators do not precisely match your needs. Perhaps you want a custom moving average with a specific calculation method, a multi-timeframe indicator that displays higher-timeframe data on a lower-timeframe chart, a dashboard that aggregates signals from multiple indicators, or a proprietary tool developed by a trading educator or community.
This is where MetaTrader 5's custom indicator ecosystem becomes invaluable. MT5 supports the installation and use of custom indicators written in MQL5, MetaQuotes' proprietary programming language. Thousands of custom indicators are available through the MQL5 Market (the official marketplace), the MQL5 Code Base (a free repository), independent developer websites, and trading communities. Combined with MT5's template and profile system, which allows you to save and instantly restore complex chart configurations with multiple indicators, custom indicators and templates form the foundation of a personalized, efficient analytical workspace.
This lesson covers the complete workflow: finding custom indicators, installing them correctly, configuring their parameters, troubleshooting common issues, creating and applying chart templates, and organizing your workspace with profiles.
Finding Custom Indicators
There are several sources for acquiring custom indicators, each with different characteristics regarding quality, cost, and reliability.
MQL5 Market (official marketplace):
The MQL5 Market is the official marketplace operated by MetaQuotes, accessible directly from within MT5 (click the "Market" tab in the Toolbox panel) or through the MQL5 website. It offers both free and paid indicators.
Advantages of the MQL5 Market:
- All products undergo a review process by MetaQuotes before publication, providing a baseline quality check.
- Indicators are guaranteed to be compatible with the current version of MT5.
- Purchases are tied to your MQL5 account, and re-downloads are available if you reinstall MT5.
- User reviews and ratings help identify high-quality products.
- Free demo versions are often available for paid indicators, allowing you to test before purchasing.
To browse the MQL5 Market from within MT5:
- Open the Toolbox panel (Ctrl + T).
- Click the "Market" tab.
- Browse categories or use the search function to find indicators by name or description.
- Click on an indicator to view its description, screenshots, user reviews, and pricing.
MQL5 Code Base (free repository):
The MQL5 Code Base is a community-driven repository of free MQL5 programs, including indicators, Expert Advisors, scripts, and libraries. It is accessible at mql5.com/en/code/mt5/indicators.
Key characteristics:
- All code is free to download and use.
- Source code (.mq5 files) is provided, allowing you to review and modify the indicator's logic.
- Quality varies significantly, some entries are professionally written, while others may be experimental or poorly documented.
- No formal review process, so testing on a demo account before relying on any Code Base indicator is essential.
Third-party sources:
Custom indicators are also available from independent developers, trading educators, forums, and communities. When acquiring indicators from third-party sources:
- Verify the developer's reputation and track record. Look for reviews, testimonials, or community discussions about their products.
- Be cautious with indicators distributed as compiled .ex5 files only (without source code). You cannot verify what the code does, and malicious code could potentially access your account information.
- Prefer sources that provide the .mq5 source file alongside the compiled .ex5 file, especially for free indicators.
- Never download indicators from untrusted or suspicious websites. Stick to established trading communities and verified developers.
Installing Custom Indicators
The installation process varies slightly depending on whether you download from the MQL5 Market or from external sources.
Method 1, Installing from the MQL5 Market:
This is the simplest method, as MT5 handles the installation automatically.
- Find the indicator in the MQL5 Market (via the Toolbox > Market tab or the MQL5 website).
- If it is a free indicator, click "Download." If it is a paid indicator, complete the purchase process through your MQL5 account.
- MT5 will automatically download and install the indicator in the correct directory.
- The indicator will appear in the Navigator panel under "Indicators" > "Market" (or under a custom folder if specified by the developer).
Method 2, Manual installation from external files:
When you download an indicator from the Code Base, a forum, or a developer's website, you will receive one or both of these file types:
- .mq5 file: The source code. This must be compiled into an .ex5 file before use.
- .ex5 file: The compiled, ready-to-use indicator.
Installation steps:
-
Locate your MT5 data folder:
- In MT5, go to File > Open Data Folder. This opens a file explorer window at your MT5 installation's data directory.
- Navigate to MQL5 > Indicators. This is where custom indicators must be placed.
-
Copy the indicator files:
- Copy the .ex5 file (and optionally the .mq5 file) into the MQL5/Indicators directory.
- You can create subdirectories within the Indicators folder for organization (e.g., MQL5/Indicators/Trend, MQL5/Indicators/Oscillators, MQL5/Indicators/Custom).
-
Refresh the Navigator panel:
- Return to MT5 and right-click on "Indicators" in the Navigator panel (Ctrl + N to show it).
- Select "Refresh" to update the indicator list.
- Your newly installed indicator should now appear in the Navigator tree.
-
If you only have the .mq5 source file:
- Copy the .mq5 file to the MQL5/Indicators directory.
- Open MetaEditor by pressing F4 in MT5 (or navigate to Tools > MetaQuotes Language Editor).
- In MetaEditor, open the .mq5 file (File > Open, or find it in the Navigator panel within MetaEditor).
- Click "Compile" (or press F7) to generate the .ex5 file.
- If compilation succeeds (shown by "0 errors" in the output panel), the indicator is ready to use.
- If compilation fails, the error messages in the output panel indicate the issues, these may require MQL5 programming knowledge to resolve or may indicate the code is designed for a different version.
Applying Custom Indicators to Charts
Once installed, applying a custom indicator follows the same process as applying a built-in indicator:
Method 1, Drag and drop from Navigator:
- Open the Navigator panel (Ctrl + N).
- Expand the "Indicators" node.
- Find the custom indicator in the list (it may be in a subfolder).
- Click and drag the indicator onto the chart where you want it applied.
- The indicator's properties dialog will appear, allowing you to configure input parameters, colors, and display settings.
- Click "OK" to apply.
Method 2, Insert menu:
- With the target chart active, go to Insert > Indicators > Custom.
- Select the indicator from the list.
- Configure parameters in the properties dialog and click "OK."
Method 3, Double-click in Navigator:
- With the target chart active, double-click the indicator in the Navigator panel.
- Configure parameters and click "OK."
Configuring indicator parameters:
Most custom indicators have configurable input parameters that control their behavior. The properties dialog includes several tabs:
- Common tab: Controls whether the indicator is shown in the Data Window, its display on sub-windows versus the main chart, and other general settings.
- Inputs tab: Lists all configurable parameters defined by the indicator's developer, periods, price types, colors, thresholds, modes, and other values. Hover over a parameter name to see its description (if the developer provided one).
- Colors tab: Allows you to change the colors and styles of the indicator's visual elements (lines, histograms, arrows, etc.).
- Levels tab: For indicators displayed in sub-windows, this tab lets you add horizontal reference levels (e.g., overbought/oversold levels for oscillators).
- Visualization tab: Controls which timeframes the indicator is visible on, useful if you want an indicator to appear only on daily charts but not on M1 charts.
Creating Chart Templates
A chart template saves the complete visual configuration of a chart, including:
- All applied indicators (both built-in and custom) with their parameter settings
- Color scheme (background, candlestick colors, grid, etc.)
- Chart type (candlestick, bar, line)
- Active timeframe
- Drawing tool default settings
- Chart properties (grid, period separators, OHLC line, etc.)
Templates do not save:
- Drawing objects (trendlines, horizontal lines, rectangles, etc.), these are saved with the chart itself
- The symbol, a template can be applied to any symbol
- Window size and position
Saving a template:
- Configure a chart exactly as you want it, apply all indicators, set colors, adjust properties.
- Right-click on the chart background.
- Select "Template" > "Save Template."
- Enter a descriptive name (e.g., "Swing_Trading_H4" or "Scalping_M5_Setup").
- Click "Save." The template is stored in the MQL5/Profiles/Templates directory.
Applying a template to another chart:
- Open a new chart for a different symbol.
- Right-click on the chart background.
- Select "Template" > choose the template name from the list.
- All indicators, colors, and settings from the template are instantly applied.
Managing templates:
- Templates are stored as .tpl files in the MQL5/Profiles/Templates directory.
- You can create as many templates as needed for different analysis styles.
- To delete a template, navigate to the templates directory (File > Open Data Folder > MQL5 > Profiles > Templates) and delete the corresponding .tpl file.
- To share a template with another trader, simply copy the .tpl file and send it to them. They place it in their own templates directory.
The default template:
MT5 applies a default template to every new chart. You can customize this default:
- Configure a chart with your preferred default settings.
- Right-click > Template > Save Template.
- Name it "default" (exactly this name).
- Every new chart opened in MT5 will now use your custom default settings.
This is particularly useful for establishing a consistent visual baseline, for example, always opening new charts with a dark background, no grid, and a 200-period moving average.
Working with Profiles
While templates save the configuration of individual charts, profiles save the entire workspace, every open chart (including undocked charts on multiple monitors), their positions, sizes, symbols, timeframes, and applied templates.
Creating a profile:
- Arrange your complete workspace, all charts, all monitors, all indicators.
- Go to File > Profiles > Save As.
- Enter a profile name (e.g., "London_Session_Analysis" or "Daily_Review_Setup").
- Click "OK."
Switching between profiles:
- Go to File > Profiles.
- Select the profile name from the list.
- MT5 closes all current charts and opens the charts saved in the selected profile.
Practical profile examples:
- Morning analysis profile: Opens daily and weekly charts for your watchlist symbols, arranged for top-down analysis before the trading session begins.
- Active trading profile: Opens execution-timeframe charts with one-click trading panels, the Trade tab visible, and economic calendar accessible, optimized for the instruments you plan to trade during the session.
- Review and journaling profile: Opens daily charts with a performance summary, trade history visible in the Toolbox, and a clean chart layout for marking up completed trades.
- Specific strategy profile: Configured specifically for a particular strategy, for example, a breakout strategy profile might open charts for high-volume instruments at the 15-minute and 1-hour timeframes with ATR and volume indicators applied.
Troubleshooting Custom Indicator Issues
Indicator does not appear in the Navigator panel:
- Verify the .ex5 file is in the correct directory: MQL5/Indicators (or a subdirectory thereof).
- Right-click "Indicators" in the Navigator and select "Refresh."
- If you only have an .mq5 file, it must be compiled in MetaEditor first (F4 to open MetaEditor, then F7 to compile).
Indicator compiles with errors:
- Open the .mq5 file in MetaEditor and press F7. Read the error messages in the output panel.
- Common causes: the code was written for MT4 (not MT5) and uses incompatible functions; the code depends on external libraries (.mqh files) that are not present; the code was written for an older MQL5 version.
- If you cannot resolve the errors and are not proficient in MQL5, contact the indicator's developer for a corrected version.
Indicator appears but does not draw on the chart:
- Open the indicator's properties (right-click chart > Indicators List > select the indicator > Properties).
- Check the "Visualization" tab, the indicator may be configured to display only on certain timeframes.
- Check the "Colors" tab, indicator lines may be set to "None" (invisible).
- The indicator may require specific data that is not available for the current symbol (e.g., real volume data that is only available for exchange-traded instruments).
Indicator causes MT5 to slow down or freeze:
- Some poorly coded custom indicators contain infinite loops, excessive calculations, or memory leaks.
- Remove the indicator from the chart: right-click the chart > Indicators List > select the offending indicator > Delete.
- If MT5 is unresponsive, you may need to force-close it and restart. On restart, the indicator will still be applied, you may need to hold Shift while opening MT5 to prevent auto-loading of the last workspace, then remove the indicator from the affected chart.
- Report performance issues to the indicator's developer.
"DLL imports are not allowed" error:
- Some custom indicators use external DLL (Dynamic Link Library) files for additional functionality.
- To enable DLL imports: go to Tools > Options > Expert Advisors > check "Allow DLL imports."
- Be cautious: DLL files can execute arbitrary code on your computer. Only enable DLL imports for indicators from trusted, verified developers.
Best Practices for Indicator and Template Management
Keep your indicator library organized:
- Create subdirectories within MQL5/Indicators based on category (Trend, Oscillators, Volume, Signals, Dashboards).
- Remove indicators you no longer use to keep the Navigator panel clean and reduce clutter.
- Maintain a personal record (even a simple text file) of where each indicator came from, its version, and its purpose.
Test before trusting:
- Always apply new custom indicators to a demo account first.
- Verify that the indicator's calculations match your expectations by comparing its output against manual calculations or known reference values.
- Run the indicator across multiple symbols and timeframes to check for inconsistencies or errors.
- Monitor MT5's resource usage (CPU and memory) after applying a new indicator to detect performance problems early.
Template versioning:
- When you modify a template, save it with a version suffix (e.g., "Swing_H4_v2") rather than overwriting the original. This allows you to revert if the new configuration proves less effective.
- Periodically review your templates and delete outdated versions to avoid confusion.
Backup your customizations:
- The MQL5 directory within your MT5 data folder contains all your custom indicators, templates, profiles, and other customizations.
- Regularly back up this entire directory to an external location (cloud storage, external drive).
- This backup protects against data loss during MT5 reinstallation, system migration, or hardware failure.
- To back up: go to File > Open Data Folder, navigate up one directory, and copy the entire MT5 data folder.
Building Your Analytical Workspace, A Practical Approach
Rather than installing dozens of indicators at once, build your workspace methodically:
-
Start with the default template. Configure a clean, comfortable default chart, your preferred color scheme, candlestick style, and one or two core indicators (such as a moving average and ATR).
-
Create strategy-specific templates. For each trading strategy or approach you use, create a dedicated template with only the indicators that strategy requires. A trend-following template might include moving averages and ADX; a mean-reversion template might include Bollinger Bands and RSI.
-
Add custom indicators selectively. Only install custom indicators that address a specific analytical gap your built-in indicators cannot fill. Each additional indicator adds visual complexity and computational overhead.
-
Build profiles for your routine. Create profiles that match your daily workflow, one for pre-session analysis, one for active trading, one for end-of-day review.
-
Iterate and refine. After several weeks of use, revisit your templates and profiles. Remove indicators you rarely reference, adjust layouts that feel inefficient, and save updated versions.
This disciplined approach prevents the common trap of "indicator overload", charts so cluttered with overlapping tools that meaningful analysis becomes impossible.
Key Takeaways
- Custom indicators extend MT5's analytical capabilities. They are MQL5 programs that calculate and display data beyond what built-in indicators offer, available from the MQL5 Market, Code Base, and independent developers.
- Install indicators in the correct directory. Custom indicators (.ex5 files) must be placed in the MQL5/Indicators folder within your MT5 data directory, then the Navigator panel must be refreshed.
- Templates save individual chart configurations. They store all applied indicators, colors, and chart properties, and can be applied to any symbol, use them for consistency across your charts.
- Profiles save your entire workspace layout. They record every open chart's position, symbol, timeframe, and template, including undocked charts on multiple monitors.
- Name your default template "default" to customize new charts. Every new chart opened in MT5 will automatically use this template, establishing your preferred baseline configuration.
- Test all custom indicators on a demo account first. Verify calculations, check for performance impact, and confirm compatibility with your MT5 version before using them in a live trading environment.
- Build your workspace gradually and purposefully. Start with core indicators, create strategy-specific templates, and add custom tools only when they address a specific analytical need, avoiding indicator overload.
This lesson is for educational purposes only. It does not constitute financial advice. Trading forex involves significant risk of loss and is not suitable for all investors.