Custom max in strategy tester

 

hi
I need to have result on strategy tester based on win(total)% and loss(total)% .(in percent%)


I found below code -- but look like need little change ! 

//---------------------------------------------------------------------
// The handler of the event of completion of another test pass:
//---------------------------------------------------------------------
double OnTester()
{
double trades = TesterStatistics(STAT_TRADES);
double win = TesterStatistics(STAT_PROFIT_TRADES);
double loss = TesterStatistics( STAT_LOSS_TRADES );
double WINlose = TesterStatistics(STAT_PROFIT_TRADES) > TesterStatistics(STAT_LOSS_TRADES);
double rec_factor = win>loss;

return(rec_factor);
}
Reason: