BUG: Block Apply Template, applies template and then erases the EA itself
-
I have added the Apply Template block on onInit (for MT4).
It does load the correct template.
The EA name flashes by in the right upper corner for a part of a second and is then removed.
I have a function that sends a report to my phone, it's executed, so it's a proof that the EA runs.
But, then unexpectedly the EA immediately removes itself. It now seem to act like a Script, haha.
I don't have any remove EA block.
What seem to be wrong? A bug?
ALSO A BUG REPORT ON THIS FORUM!
This post was not possible using Brave (a popular Chrome Browser).
The preview to the right was not visible and after posting an icon would continue circulating forever.
I'm now testing Firefox again, let's see if it works... (at least the preview is visible here)
-
@fxfun Can you please share your project?
-
@l-andorrà No need to share (to big project anyways). You can replicate the bug easily.
Just add Apply Template block on onInit, and you will see your EA removed from the chart.
Ok, here is a simple sample project for you to save your time...
-
Mr FXDreema!
Please respond asap.
Let me know how it's going with the Bug-fixing.
I am appreciating an urgent reply and handling.
-
@fxfun hey there , i used the apply template block a few days ago , everything was working perfectly , can
you confirm if the template you are applying is saved after the ea is attached to the chart? (meaning if the template do not have the ea attached then it will remove when the template is applied)i had a look at the project you have shared above and its not a fxdreema bug , its a logical mistake , here is whats happening :
when you attach the ea to the chart it immediately loads the template which causes the ea to be removed because the template that is being loaded do not have the EA in it so it wont load the EANow there are 2 ways to remedy this situation :
Solution 1: https://fxdreema.com/shared/jhulzt8ud
in this way your EA will save the template with EA attached before applying the Template , how ever it will do this on all the charts which will cause some problems hence i added the condition block to check for an int constant
I recommend that you run the EA on the chart with the "Mode = 0" so the EA can save the template with the EA attached , once you get a template with EA on chart , you can change the value to a non zero value and it will always load the template and you can have the ea attachedSolution 2: remove the custom mql block and condition block from my shared project and add a custom mql block before the apply template block and write : Sleep (15000); and attache the ea to the chart and save the template within 15 seconds , ( you can remove that block after you get a template with ea attached )
-
This "logical mistake" looks like a bug to me
-
bug, not bug is irrelevant...the way I've noticed FXDreema works is if someone can code around issues with extra blocks, then that is the better solution because the developer can not possibly create 1 solution for everything.
-
I don't know if there is anything to solve, but i know that an Expert Advisor and a Template cannot work on the same chart together. @FXFun @l-andorrà @Zackry @LuciVuur @jsauter86
-
@ambrogio I'm afraid this is an issue for the admin to fix. I have no idea how to do that.
-
@lucivuur said in BUG: Block Apply Template, applies template and then erases the EA itself:
This "logical mistake" looks like a bug to me
then you would need to look a bit more closer , cuz its simply user's fault of not knowing how this particular feature works , one can not blame ones own lack of knowledge on someone else
block works exactly as it suppose to work , saying otherwise doesnt make any sense
other option would be to ask Metaquotes to change how their platform works, you can try....cuz its metatrader function (template load) cuz if you manually load a template which does not have the ea attached to the chart then the ea will not magically appear after you load the template , you will need to save the template with ea attached to the chart if you want the ea to be attached after template load
-
@ambrogio i think they can work together (if i am not mistaken , since its been a long time i last work with it ), if the template is save with the ea attached to the chart it should work , cuz if its attached and when the template is reloaded then it will automatically load the ea as well , and if template is saved without the ea in the template then it wont load the ea once the template is loaded
-
@zackry I think you are right, in manually mode we manage to load the template on the chart first and only then the EA. Conversely if you load the EA first and in second time you attempt to load a template, then the EA is removed from the template
-