MT4 templates are a quick way to set up a chart with your favorite settings and parameters.
When you are trading, it is very probable that you often work with the same indicators. Also, it is very likely that you want to see the chart and candles with specific colors. If this is the case, then it would be useful for you to learn how to set an MT4/MT5 default template.
What Are MetaTrader Templates?
What are MT4 and MT5 templates? MetaTrader templates are files that contain sets of parameters to configure your chart with your preferences.
A MetaTrader template includes the following important settings:
- Color and style settings for background and candles.
- Chart scale.
- Chart type: line, bar, candlestick.
- Loaded indicators and their parameters.
- Attached expert advisor (EA) and its parameters.
- Graphical chart patterns.
Here is what a chart template does not include in MetaTrader:
- Selected timeframe.
- Actual chart price data.
- Trading account settings.
- Server settings.
- Chart scroll position.
The function of MT4/MT5 templates is for traders to create a standard of chart visualization and analysis that they can quickly apply to other charts.
MT4 Template Files
Templates are saved by default in the MT4 data folder, into templates subfolder.
Template files have a .TPL extension.
MT5 Template Files
In MT5, templates are saved to the MQL5/Profiles/Templates/ subfolder of the platform's Data Folder.
Like in MT4, MT5 template files have the same .TPL extension.
What Is Default Template in MetaTrader?
A default template in MetaTrader is a group of settings and chart tools that are loaded on a chart by default. Default template file name in MT4 and MT5 is default.tpl.
For example, if you followed our guide on how to install MetaTrader 4 client terminal, your color scheme probably looks like the one in the image below.
You also may notice that there are no indicators loaded by default.
In the screenshot, you can see some the default template settings:
- Black background
- Green bars
- No indicators
- No expert advisors
- Small scale
How to Set Custom Default Template?
Now that you know what templates are, it is time to make your own.
You can create your own default template, so that every time you open a new chart, it will load with your default settings.
To set your own MetaTrader default template, do the following:
- Configure the desired chart and bar colors.
- Set the preferred scale.
- Select the preferred chart type.
- Load the indicators you want with their settings.
- Load the EA you want and set it up.
- Right-click the chart and select Template, or click the Templates button in the Charts toolbar.
- Click Save Template...
- Name the template as Default and click Save; it will prompt to overwrite the existing default template.
You can follow a similar process to create other templates that you can apply when desired.
You have now created your custom default template and you will be very happy to see that even when you restart MetaTrader4 your settings will be maintained.
This is very useful also to match the charts with your trading strategy as the template will automatically apply the indicators, and many strategies are based on a number of indicators.
Creating a default template will save you time — you will have the chart ready for analysis in just two clicks.
Saving Default Template for Strategy Tester in MT4/MT5
When you launch a visual backtest of an indicator or an expert advisor in MetaTrader's Strategy Tester, it is using a chart with predefined settings and it can be annoying to reconfigure it each time according to your preferences.
However, Strategy Tester both in MT4 and in MT5 supports a default template — tester.tpl.
All you have to do is to follow the same steps as you do when creating a normal default template in MetaTrader and then save it as tester.tpl.
Now all your backtests will be lunched with your favorite colors, styles, and indicators.
Here is, for example, how my custom default template for Strategy Tester looks:
Template Settings in More Detail
Here some of the settings that are included in MetaTrader templates and an explanation of how to change them.
Change Color Scheme
To change the colors, you need to right-click the chart and select Properties (alternatively, press
For example, if you prefer to work with colored candlestick on a white background you can start with a Black On White color scheme.
After that, you can tweak the colors for bars and wicks.
Change Chart Style
As a part of the template, you can also change the chart style, which can be:
- Bars
- Candlesticks
- Line
Change Zoom/Scale
You can change the zoom level as well, or in other words, the horizontal scaling of the chart. Scaling out will make the bars (or candles) narrower with more of them fitting on a screen. Scaling in will make them wider, but fewer of them will fit the screen.
Add Indicators
Another advantage of configuring a template is the possibility of adding and saving indicators.
So if, for example, you like to work with a moving average, ATR, and stochastic, you can add your favorite indicators with your preferred input parameters.
Remember that if you use custom indicators, you can also save them to a chart template (default or otherwise).
Add Expert Advisor
And finally, in a template, you can also configure the expert advisor that you want attached to the chart.
Template vs. Profile in MetaTrader
It is important to understand the difference between templates and profiles in MetaTrader.
In MetaTrader, a template is a group of settings applied to a chart.
A profile, instead, is a set of charts open at the same time on a specific timeframe and with specific assets or pairs.
So, a profile is a set or group of charts that you load in your client terminal.
A template is a set of parameters and tools loaded on a chart.