Download MetaTrader 5

Searching for script creating more detailed report with more statistics after testing EA - page 3

To add comments, please log in or register

Thanks for uploading this.

Sadly, I cant seem to get any csv file produced and when I compile my EA I get a number of Function warnings such as:Function "MathAvg2DArray" is not referenced and will be removed from exp-file,Function "MathStdev2DArray" is not referenced and will be removed from exp-file etc for a total of 5 functions. Could that be the reason I dont get the csv file ?

Otherwise, after I've added the code from your post above and changed the relevant bits to reflect my EAs name etc, the file compiles fine and the optimisation happens without a hitch.

Any suggestions would be appreciated.

It means the those functions aren't being used. Maybe include them in your report, and the errors will go away. The EA will still work fine, and these are not serious.

I want to add trendline of equity curve according to this article

How can I add this can anyone help ?

r=cov(X,Y)/(Sx* Sy)

N - amount of trades;
X - Balance;
Y - linear regression;
M(X) - Balance mean value;
M(Y) - LR mean value.

Jason Crossfield
Jason Crossfield  

Hi LadyGaga,  offer a free plugin EA that provides weekly stat reports.  You can even track individual results for independent strategies/EA's.  

Donald R Isbell Jr
Donald R Isbell Jr  


I tried using the mqh files, and but its not working for me.

I know when MetaQuotes updated MT4 to v600 that we had to start defining FILE_SHARE_READ and FILE_SHARE_WRITE. So I changed everywhere in code where it says FILE_READ to FILE_READ|FILE_SHARE_READ. I also changed everywhere in code where it says FILE_WRITE to FILE_WRITE|FILE_SHARE_WRITE.

I still had 2 errors compiling EA. The cause is IdentifyTradesToIgnore function returns an array instead of an integer in 2 places. I could just return 0 if not enough data elements in data array, but seeing that the function is called without defining a variable when it's called, I don't see a need to use integer for function return type. I decided to just use void and return nothing if not enough elements in data array. 

So now it compiles without errors, but I don't get a CSV file when trading, backtesting or optimizing. My hope is to get a line in a CSV file for each optimization pass with more info to judge which settings are best besides using Gain, DD, and Profit Factor. Plus any info on what best metrics to use would be great.

Thanks in advance!

Kindest regards,


To add comments, please log in or register