Download MetaTrader 5

Seperating backtest results into months(costum parameter)

To add comments, please log in or register
They are making profit already using Freelance service. You can join them!
redlum
20
redlum 2015.03.09 18:25 

good evening,


Im trying to add a costum optimazation paramater to the EA strategy tester and i have two questions about it,

What i'm trying to do is to seperate my data from a single optimazation run, lets say from december 2014 till februari 2015 into data from single months. I'm trying to create a script that has a steady profit each month. So basicly after an optimazation run containing data from 3 months to get the Net-profit from month 1, month 2 and month 3 seperate. This way i can see if the result depends on daily events or more rare events. Getting this into a script would safe a lot of time


I don't know where to start, below is what i had in mind. I havent had it working yet, this will be question one, how will i get the 3 variable to show up in the optimazation result section . The second thing that i think that will hapen is that TesterStatistics(STAT_PROFIT); returns the value of all 3 months and not just one.


double OnTester(){
   double month1;
   double month2;
   double month3;
   if(Month() == 12){
   month1 = TesterStatistics(STAT_PROFIT);
   }
   if(Month() == 1){
   month2 = TesterStatistics(STAT_PROFIT);
   }
   if(Month() == 2){
   month3 = TesterStatistics(STAT_PROFIT);
   }


}



It would be great if anyone could help me with this, Thanks in advance.

 P.S english is not my native language, forgive me for any spelling errors.

redlum
20
redlum 2015.03.10 10:20  
double OnTester(){
   double month1 = 1.0;
   double month2 = 2.0;

   double month3 = 3.0;


   if(Month() == 12){
         month1 = TesterStatistics(STAT_PROFIT);
         return month1;
   }
   if(Month() == 1){
        month2 = TesterStatistics(STAT_PROFIT);
        return month2;
   }
   if(Month() == 2){
         month3 = TesterStatistics(STAT_PROFIT);
         return month3;
   }

}


It returns a value if i test one month, so if i test december it returns month1. But as soon as i test multiple months, lets say december and january it returns 2. The predifined value.

How do i return multiple variables? i tried google but i couldn't find anything good.

and i think it will return the whole STAT_PROFIT for the test and not just of one month.


Thanks in advance

david mackay
2212
david mackay 2015.03.11 04:23  
I wonder if you can not use excel for this purpose
redlum
20
redlum 2015.03.13 10:56  
i exported all data to excel but i am not sure how to make it automated.
To add comments, please log in or register