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

 

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

 
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.
 
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. 
 
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().
 
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.
Reason: