Add template to all open charts

 

Forgive my ignorance here, but where would I need to post a development request for an update to the Metatrader Software to include an option to add a selected template to all open charts?

Hope someone can help.

 
 
Save your designed template with name "default.tpl"
 
Do Hung:
Save your designed template with name "default.tpl"
If I have already set up the default.tpl and I want to make a small changes to one of the graphs and I want to apply to other open graphs, how can i ?
 
Make the change, save a template, apply to other charts.
 
Isho888:
If I have already set up the default.tpl and I want to make a small changes to one of the graphs and I want to apply to other open graphs, how can i ?

Here is a script that I use to do this:

//+------------------------------------------------------------------+
//|                                                     Template.mq5 |
//|                                                 Henrique Demarco |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Henrique Demarco"
#property link      ""
#property version   "1.00"

   long nextChart, currChart=ChartFirst();
   int i=0, limit=100;

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {

//Atualizar todos os gráficos com o template padrão
   while(i<limit)
     {
      ChartApplyTemplate(currChart,"default.tpl");
      Print(i,"-",ChartSymbol(currChart)," ID =",currChart);
      currChart=ChartNext(currChart); // Get the new chart ID by using the previous chart ID
      if(currChart<0) break;          // Have reached the end of the chart list
      i++;// Do not forget to increase the counter
     }

   
  }
//+------------------------------------------------------------------+

Consider that your template filename must be 'default.tpl' and must be saved in 'terminal folder/Profiles/Templates'. I am also assuming you don't have more than 100 charts open.

If you need any change, I am sure you can handle by yourself.

Best regards and have fun.

 

Slight modification to apply the chart the script is dragged to onto all other charts. Also decreased the chart limit for speed.

//+------------------------------------------------------------------+
//|                                                     Template.mq5 |
//|                                                 Henrique Demarco |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Henrique Demarco"
#property link      ""
#property version   "1.00"

   long nextChart, currChart=ChartFirst();
   int i=0, limit=20;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {

   ChartSaveTemplate(currChart, "temp.tpl");
//Atualizar todos os gráficos com o template padrão
   while(i<limit)
     {
      ChartApplyTemplate(currChart,"temp.tpl");
      Print(i,"-",ChartSymbol(currChart)," ID =",currChart);
      currChart=ChartNext(currChart); // Get the new chart ID by using the previous chart ID
      if(currChart<0) break;          // Have reached the end of the chart list
      i++;// Do not forget to increase the counter
     }

   
  }
//+------------------------------------------------------------------+