I have exactly this problem. GetLastError gives a 0. Applying the template manual is working.
The function ChartApplyTemplate is simply doing NOTHING, only giving a true back, great :(
Other templates in the same directory, which only differ in 1 or 2 settings are applied normally. Also apllying in a loop with a Sleep(200) between the calls is not working...
- www.mql5.com
Yes I finally successfully loaded my template ... in the same chart , mt4 not allow to you load template and EA together ...
if you run a EA and load any template in the same chart , the ea remove from chart !
if you want load a template with ea you must open a new chart with ea and load template on that , otherwise not worked and you get true from chartapplytemplate function but chart not change !
i'm sorry about my bad english ...
I hope it helped you
best regards
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to show automatically a template on the chart when I use my EA, So I used
Alert(ChartApplyTemplate(0,"My_template.tpl");
When I run my EA, the Alert returns True, but my template is not applied. (I also tried without the "Alert")
The template works fine when I add it manually.
Any idea where this comes from?