Custom optimization criteria of 'Win Rate'?

 

Hi! I am trading binary options and need to optimize for just one goal: Win Rate (%). Nothing else matters.

Has anyone created a custom optimization criteria for this, or would be willing to show me how to add this to my EA?

Thanks 😊

 
ddcmql: I am trading binary options
IMHO: The best bets in a casino is Craps pass line with double odds, around 0.6%. One of the worst is American Roulette at 5.26%. Binary Options are at 30%! Forget them.
 
Thanks William, did you want to answer the question? (I guess the answer is "no") 😊
 

Hey,

I just saw your post while looking for the solution to the same problem.

Here is how I work with Custom Max to optimize for WinRate %.

//+------------------------------------------------------------------+
//| OnTester function                                                |
//+------------------------------------------------------------------+

double OnTester()
{
    // Abrufen von Handelsstatistiken aus der Optimierung
    double totalTrades = TesterStatistics(STAT_TRADES);
    double winTrades = TesterStatistics(STAT_PROFIT_TRADES);

    if (totalTrades == 0) // Verhindert Division durch 0
        return 0;

    // Winrate berechnen
    double winRate = winTrades / totalTrades * 100;

    return NormalizeDouble(winRate, 2); // Rückgabe des Wertes für die Optimierung
}


Maybe this helps.