A couple of days ago I published an article about an MT4 script that changes all open price charts timeframe (here). Today, I am going to share another script which is also so helpful and TimeSaver. This script applies a template to all the open price charts all at once.
Why Is This Script Important?
Sometimes I create a template and want to apply to all the open price charts on my MT4 platform. I usually have about 25 price charts working on the same instance of MT4. Applying the template on all the 25 charts is so tiring and time consuming. Besides, when I find out that I have made a mistake in the template I created or I have to change one of the indicators settings, then I will have to apply the modified template to all the 25 charts from the scratch. The script I am going to share can apply any template to all the open charts in less than a second.
Before I tell you how to use the script, I have to explain a little about template, because probably some novice traders don’t know what template it.
Press Ctrl+M, right click on one of the currency pairs and click on chart window to open a price chart:
Then make some changes on the chart. For example you can right click on the chart, refer to the properties and change the colors. You can add indicators. You can shift from bar to candlestick. Finally you create the chart you wanted. But you want to have the same design with the other price charts you will open:
If you want to make all the changes one by one on all the other charts you open, it takes you a long time and it is so tiring too. However, you can simply save the chart template and apply the template on any other price chart you will open. This saves you a lot of time and energy.
To save a template you can simply right click on the price chart, click on “Template” and then on “Save Template…”. Give a name to the template and click on “Save”.
To apply this template to another price chart, you can right click on the chart, click on “Template” and then click on the template name:
This is how you can use templates to save time.
Now, let’s say you have created a template and you want to apply it to all the open price charts on your MT4 platform. As I mentioned, it takes a lot of time to do it one by one. You can simply use the “Change_Template_All” script that applies any template you choose to all the open price charts.
How to Install the Script:
1. Click Here to download the script file.
2. Run your MT4 platform.
3. Click on “File” menu at the top left of your MT4 platform.
4. Click on “Open Data Folder”.
5. Open the “MQL4” folder.
6. Open the “Scripts” folder.
7. Copy and paste the Change_Template_All.ex4 file you just downloaded to the “Scripts” folder.
8. Restart the MT4 platform.
9. Press Ctrl+N to open the navigator. Open the “Scripts” dropdown.
10. Double click on Change_Template_All.ex4:
11. Choose the “Common” tab and check the “Allow live trading” and “Allow DLL imports” on the opened dialogue box:
12. Choose the Inputs tab and double click on the number below the “Value” column. It is zero by default which is related to the first template saved on the platform.
13. You can see the list of saved templates if you right click on one of the price charts and click on the “Template”. The opened menu is the list of saved templates. The first template value (template index) for the above script is 0. The second template is 1, and so on:
14. Enter the template value in the value field on the Inputs tab, and then click on the OK button. The template will be applied to all open price charts.