ChartApplyTemplate Use

 
How can ChartApplyTemplate() be use on Expert Advisor and reuse after short interval like 15mins. Is this more relevant in MT5? Anyone with much knowledge on this?.Thank you.
 
MThomp:
How can ChartApplyTemplate() be use on Expert Advisor and reuse after short interval like 15mins. Is this more relevant in MT5? Anyone with much knowledge on this?.Thank you.
   long chartID=0;                      // Zero for the current chart
   string templateName="example.tpl";   // Template name 
   if(!ChartApplyTemplate(chartID,templateName)) printf("Applying %s template failed with error %d",templateName,GetLastError());
 
MThomp:
How can ChartApplyTemplate() be use on Expert Advisor and reuse after short interval like 15mins. Is this more relevant in MT5? Anyone with much knowledge on this?.Thank you.

Be aware that if you apply a new template to the current chart, the new template should have the EA on it in order to continue to use the EA.

Reason: