Download MetaTrader 5

Tester: How to Evaluate the Expert Testing Results

To add comments, please log in or register
Publish your programs in the Market. Make money with your knowledge!
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2006.06.01 13:08 

New article How to Evaluate the Expert Testing Results has been published:

The article gives formulas and the calculation order for data shown in the Tester report.

Before starting to test, the testing subsystem loads the expert, sets its parameters previously defined by the user, and calls the init() function. Then the Tester plays through the generated sequence and calls the start() function every time. When the test sequence is exhausted, the Tester calls the deinit() function. At this, the entire trading history generated during testing is available. The expert efficiency can be analyzed at this moment.

Author: Slawa

Yousky 2007.08.07 01:22  

Very good script to have informations about testing.
All seems to work except le MaxDrawdown/MaxDrawdown percent :-( I do not have the same result in the TXT file sumary and the MetaTrader report ?

Why ?
Slawa 2007.08.07 08:32  
The formula was changed 2 months ago. The drawdown is now calculated by equity, not by balance
MQL4 Comments
MQL4 Comments 2008.02.05 08:03  
I am really newbie
I have try this script to put in EA (I use MACD Sample EA) but not running well.
I think it caused I am missing something
Please anybody tell me how exactly put this script  to existing EA (ie. MACD Sample EA) with clearly step by step instruction

It would be very helpful if You can submit sample EA with this script

Thanks in advance
MQL4 Comments
MQL4 Comments 2010.03.31 09:53  
yeah there is something wrong with MaxDrawdown/MaxDrawdown percent .. it's not the same result as on MT
MQL4 Comments
MQL4 Comments 2010.03.31 09:59  
"profit in points" and "calculate profit in points" i can't forget out!
you're expert making money on backtest cool but switch to "calculate profit in points" some expert show as loosing mony ? i mean what exactly calculate profit in points mean ?

here we are again!
the normal profit calculation is
//---- calculate profit
double profit=OrderProfit()+OrderCommission()+OrderSwap();
profit in point calculation is

//---- calculate profit in points
Jinsong Zhang
Jinsong Zhang 2010.09.15 16:52  


MQL4 Comments
MQL4 Comments 2011.01.30 02:35  
Good. Then I can use Excel or MATLAB to draw a picture.
blackmore 2011.11.15 12:40  
does this work for optimisation also?
MQL4 Comments
MQL4 Comments 2012.09.05 04:42  

Hi Slawa et al,

Very much a NuB here.

I need a Back Test and Optimization Report Summary that doesn't include all of the trades. I'm hoping to add in the picture of the graph as well. But this looks like just what I need thanks (< 8)

Before I start, what and where are the two programs that generate the Mt4 Optimization and Back Test reports? Are they compiled (C++) MQL4 and are they directly accessible by us? It would be great if they were as I just need to eliminate the large lists of all of the trades and could possibly temporarily disable this aspect of them. Or just have to separate report Summary versions: One with the trades included and one without.

But *.mqh files go into the include folder and not *.mq4 files done't they? I tried it both as an mq4 and an mqh file and in both instances the compiler checks them out as being just fine themselves. However as soon as the EA is compiled, it goes crazy as it encounters 2 init, 2 deinit sections and flags these as errors and a whole LOT of: ')' - unbalanced right parenthesis errors. I've looked it over and I can't see how it can work in the setup with putting basically what are 2 complete EAs together and combining the code into one init section and one deinit section.

So I tried 'Copying and pasting' everything from your ReportSummary program that is in the init and deinit sections into an EA and 'remarked these out in your report EA and I can get these two functioning alright this way, but then it does the same thing with the 'start' function which being the body of the program is huge. Thus it would basically melding the two EAs together. But I know that include files can and do work very well for such things. But aren't they usually just a bunch of indivdiual function definitions etc so that one can just call them from any EA at any time without having to remake them every time?

Their is little doubt that you and the other folks here know a LOT more about this than I do and that I am making a fundamental error right from the very start? I'm fairly certain that what I have been trying: combining them both into one physical EA, is not the problem and approach to use. What fundamental mistake am I making right at the very start of this please that thwarts the whole thing for me?

To add comments, please log in or register