logo
Get Our New E-Books For Free

MT4 Script to Change All Open Price Charts Template

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.

Before you read the rest of this article... Submit your email to receive our eBook for Free:

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.

Join Our 22,000+ Loyal Followers Now & Receive Our E-Book For Free!
Download Our E-book For FREE and Don't Miss Our New Articles!
Enter your email address and check your inbox now:

Article by

"Whether you think you can, or you think you cannot, you are right." - Henry Ford

+ Click Here to learn who we are and why this site was created.

+ Click Here to receive our eBook for free.

I want to...

22 thoughts on “MT4 Script to Change All Open Price Charts Template
  1. agyusant says:

    Thank you for the script, Chris.

  2. Paul says:

    Thanks for both script

  3. Handi says:

    Thanks, Chris, this is really helpful!

  4. Rado says:

    Hi Chris,
    thank you very much for the script, it comes very handy.

    I just want to add little hint with the templates in MT4, especially for the novice traders.

    If you save your favorite design looking chart as template with the name “default” (and overwrite the old one, if already exists), from that moment every new chart window you will open in MT4 will be opened with this default saved template applied. It’s because new chart window automatically loads templates named “default”.

  5. Abdi says:

    Hi Chris

    To further simplify your time frame script for using it easily, I have created templates for Daily time frame, Weekly time frame and Monthly time frames and saved them as different templates. All I need to do is go to templates and switch to either daily, weekly or monthly with one click.
    I am quite satisfied with this and I hope it can help others too.

    Thanks for your help

  6. Abdi says:

    Hi Chris

    Correction
    I mixed up Profiles with Templates, please ignore templates in my earlier message, I meant Creating different profiles in daily, weekly and monthly and switching between these profiles as needed.

    Thanks

  7. Dionisis says:

    Hello Chris,

    Thank you for all the useful scripts you share with us.

    I have also written a script and I would like to share it with the LuckScout community. It is a very simple function that calculates the position size of a trade. All you have to give as an input are the stop loss price and the desired risk. The calculation is done as it is explained in one of your articles (including the spread in case of a short position).

    I used to use the LuckScout online calculator but I find it much easier to just attach this script on a chart.

    If you think that this might be useful for your followers, please let me know where/how I can share it.

    Thank you

    • Chris says:

      Hi Dionisis,

      Thank you.

      Yes, we love to share helpful scripts on the site. Please kindly drop us a line here and someone will reply you and you can attach your script. We will share it on the site then.

      Thank you again.

    • Chris says:

      Hi Dionisis,

      Peter informed me that he tired to reply your email but it returned to us because Hotmail has blocked our emails. You can either send us another email address or whitelist LuckScout.com so that you get our emails.

      Thank you.

  8. jason says:

    I could not get the script to work, my guess is that the market was closed when i tried to run it, however i created my favorite template then saved it under the name default and now every chart i open has my favorite template. Is this the same thing the script is accomplishing? Thanks

    • Chris says:

      This script works even when the market is closed.

      What you applies to any new price chart you open. This script is able to change all open price charts templates all at once.

      • jason says:

        I cant distinguish between if im doing something wrong or my platform download is corrupted.

        Do you have to have all the charts open you want first?

        Will it work on mt5 or other platforms like web based?

        I’ll keep trying thank you.

  9. Zoki says:

    I have another problem. During the time I collected a lot of templates, mostly given free. I also made a lot of versions of different setups, which I saved as template. Let’s say, I have opened at once 30-50 charts. From these for instance 8 EURUSD charts (one showing some momentum indicators, another one completely another setup given for free online, then one template which came from free service A, one from service B, etc…. you got idea), then I have 5 charts with Gold, few other charts with other templates for GBPUSD, etc.. Now – I look at one chart and I want to change some colors, or to change some parameters, or add another indicator. After I do that, I want to save this template… but how can I know which template from 100+ templates is that one? I don’t want to save template under the wrong name (or wrong version of one setup template). Simply question, how can I know which template am I looking on the MT4 chart? I found no way to know that, except if I start to guess and open new chart and go to load there 50 different templates, until I find the one which I’m watching on the other chart, so I know which template may I update when I save it, to not save under the wrong name. Is this modest need possible in MT4 or not?

    • Chris says:

      Once you load a template on the chart there is no way to know which template it was. It is not recorded on the chart. You have to save templates with specific names that describe the template function and its relation to the trading system you follow.

      • Zoki says:

        Thank you, Chris. Yes, I’m doing this for most of my templates, but after months it’s hard to recognize, do I have on one chart A template version 3, or maybe B template version 5, so I’m not sure sometimes which version (or even template) am I editing, is the last one (which was updated only on portion of charts) or previous one (on the chart where template wasn’t updated to the last one). One idea – maybe it would be good to make a catalog, screens of all charts, saved under the names of templates. So when I need to compare something, I could just go to thumbnail views and search for most similar template, so I find which template and even which version of template that one on the chart could be. Anyway, there are A LOT of stuff which MT4 should offer, to make a life of trader easier… Thanks.

  10. Vladimir says:

    Great!!!

  11. KevinSteeman says:

    thx works great.

  12. Sangeet Prasad says:

    Thanks this script and the change timeframe script works like a charm, you just saved me may so much time and stress. Wish you very best in everything..

  13. Reza Samimi says:

    Very Helpful …. Thank you

Leave a Reply :

Your email address will not be published. Required fields are marked *

*