I making an EA and on that EA I need 3 EMAs displayed on the chart, with different colors. So I have tried to use ICustom (my topic) and after some suggestions I'm trying to load the template that I have made. I have template on "C:\Users\...\MetaTrader - Install\profiles\templates" and mannually it works but when I try to run the EA on tester it gives an error that it can't find the template:
"... Load_Template_v27-01-2016 EURUSD,Daily: File 'template_Forex_v2.pdl' not found in C:\Users\...\MetaTrader - Install\profiles\templates"
I have tried an simple EA just to apllie te template, like on mql4 docs but I have one question:
- Can I load template on strategy tester? It doesn´t work when I run the EA...
- The 3 EMAs used in the EA are due to the EA EMAs or are 3 different EMAs, used by the template and only for display?
- Do I call ChartApplyTemplate on OnInit?
- When I use a template in an new chart, manually though, it overrides the symbols that I have created with the EA! Will not happend the same when i call the template load function?
Print("Terminal data directory:",terminal_data_path);
Print("The file template_Forex_v2.tpl found in Files'");
Print("The template 'template_Forex_v2.tpl' applied successfully");
Print("Failed to apply 'template_Forex_v2.pdl', error code ",GetLastError());
Print("File 'template_Forex_v2.pdl' not found in "
There have been some issues with templates and visual testing. Have a look through these threads and you may find a workaround
There are probably other threads too if you search.
I did read that "Adding templates to visual testing window is denied now" although angevoyageur saying that we can set our template BEFORE the strategy tester start to run. What I don't know is if we set by code on the EA!??
So, what I have done was creating two templates and call it "Default.tpl" and "Tester.tpl" and I think that its working... the only problem that I'm seeing in this method is that when I optimize the EA I will have to change EMAs indicators on the chart to see if its working ok.
I am correctly?
I am now more cleared!
To add comments, please log in or register