Download MetaTrader 5

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

To add comments, please log in or register
mbingol
26
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

Tan Phan Ngoc
1331
Tan Phan Ngoc  
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  
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
31606
Alain Verleyen  
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  
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