Write to the Custom column in optimization results MT5
-
Hello,
I understand that this is possible using Custom MQL code, but my programming skills are poor. I don't believe Fxdreema has this functionality built-in.
My EA will Terminate if the Free-Margin falls below a level set via a Constant.
I simply wish to record that a Terminate 'event' occurred in the Custom column in the Optimization results, so I can filter them out.
Any help would be greatly appreciated.
Paul
-
I tried this, but not so simple.

-
Are you trying it on MQ5 maybe? I know some errors are present there. Try to use MQ4 instead.
-
@l-andorrà Unfortunately, using MT4 is not an option for me. I understand that double OnTester() is tied to Genetic algorithm Optimization, so the above may not work as I am using Slow complete algorithm for Optimization. Not sure how to write to the Custom column and currently thinking about how to tackle this problem. Coding is outside my area of expertise.
-
As a work-around, I may be able to make use of the Write to File block.
My EA controls when it writes to the file, during Optimization ie before Termination of current test.
The problem is I need some Custom Code that is able to fetch the Optimization Pass number, put it into a variable, which I can then Write to a file. Hopefully these would then tie together. If anyone can point me in the right direction, I would be grateful. I have no idea if this would be possible.
-
I'm afraid that I cannot be of any help here, sorry. I'm not a programmer. I hope someone else can help.