by using ChartRedraw() after ChartApplyTemplate() I was able to make the changes be effective.
Now I have another issue: my template has an EA. When I apply this template manually, the "allow algo trading" setting inside the EA is ticked. But when applying this template using ChartApplyTemplate(), it is always unticked (algo trading deactivated). Is there a way to make the algo trading option inside the EA ("common" tab) to be always active? Thank you so much
Now I have another issue: my template has an EA. When I apply this template manually, the "allow algo trading" setting inside the EA is ticked. But when applying this template using ChartApplyTemplate(), it is always unticked (algo trading deactivated). Is there a way to make the algo trading option inside the EA ("common" tab) to be always active? Thank you so much

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello!
I have a button on my EA that opens another chart and tries to apply a template on it.
Here's the code that deals with the action caused by the button. I even wait 5 seconds after the chart opens to apply the template:
The thing is: the template is only activated randomly when I press the button. A new chart always opens but most times the template is not applied to the chart. Eventually it does, but not always! ChartApplyTemplate always returns true, though, even when the template is not applied to the chart.
How can I make ChartApplyTemplate react correctly and apply the template to the chart?
Thank you so much!