Download MetaTrader 5

Is there any way to read the template name of the chart?

To add comments, please log in or register
Does your signal already have a lot of of subscribers? It's time to think about the paid subscription!
mbingol
26
mbingol 2015.08.03 06:41 

Hi,

When I attach my EA, I need to see what template is attached to the chart so that EA can open other time period charts of that symbol with whatever template has been applied to the chart.

We can apply  a template with ChartApplyTemplate  command. But I couldn't find a command like ChartGetTemplate.

Thanks  in advance 

Mehmet

Tan Phan Ngoc
1332
Tan Phan Ngoc 2015.08.03 11:18  
mbingol:

Hi,

When I attach my EA, I need to see what template is attached to the chart so that EA can open other time period charts of that symbol with whatever template has been applied to the chart.

We can apply  a template with ChartApplyTemplate  command. But I couldn't find a command like ChartGetTemplate.

Thanks  in advance 

Mehmet

only EA or indicator can attach on chart.
mbingol
26
mbingol 2015.08.03 11:35  
Tan Phan Ngoc:
only EA or indicator can attach on chart.
You are right I had to use the word "apply" instead of "attach" for templates on a chart. 
Alain Verleyen
Moderator
30688
Alain Verleyen 2015.08.04 16:55  
mbingol:

Hi,

When I attach my EA, I need to see what template is attached to the chart so that EA can open other time period charts of that symbol with whatever template has been applied to the chart.

We can apply  a template with ChartApplyTemplate  command. But I couldn't find a command like ChartGetTemplate.

Thanks  in advance 

Mehmet

It's not possible to get the template used. You have to use a workaround : ChartSaveTemplate(), open a new chart, ChartApplyTemplate().
mbingol
26
mbingol 2015.08.21 13:10  
Alain Verleyen:
It's not possible to get the template used. You have to use a workaround : ChartSaveTemplate(), open a new chart, ChartApplyTemplate().
Excellent workaround. Thank you very much Alain.
To add comments, please log in or register