I have some issue trying to apply template to charts that I open using my script. The charts open but the template don't apply when I use ChartApplyTemplate
Here is the code.
Do you have a template with that name inside 'terminal_data_path\MQL5' or inside 'terminal_path\Profiles\templates' ?.
In the other hand, 0 denotes the current chart. If you have a template with that name, it would apply to the current chart, and not to the new opened chart. You would have to replace 0 by the new chart ID. Example: