//+------------------------------------------------------------------+
//|                                                    RiskTypes.mqh |
//+------------------------------------------------------------------+
#ifndef RISKTYPES_MQH
#define RISKTYPES_MQH

//+------------------------------------------------------------------+
//| CTradeStats                                                      |
//| Summary statistics measured from closed trade history: trade     |
//| count, win rate, average win and loss size, and the longest      |
//| losing streak actually observed.                                 |
//+------------------------------------------------------------------+
struct CTradeStats
  {
   int               trade_count;
   int               win_count;
   double            win_rate;
   double            avg_win;
   double            avg_loss;
   int               max_loss_streak;
  };

//+------------------------------------------------------------------+
//| CStreakProbability                                               |
//| One row of the streak probability table: a streak length and the |
//| computed probability of encountering at least that many losses   |
//| in a row.                                                        |
//+------------------------------------------------------------------+
struct CStreakProbability
  {
   int               streak_length;
   double            probability;
  };

//+------------------------------------------------------------------+
//| CRiskOfRuinResult                                                |
//| One risk-of-ruin calculation: the risk-per-trade percentage it   |
//| was run at, the normalized edge behind it, and the resulting     |
//| ruin probability.                                                |
//+------------------------------------------------------------------+
struct CRiskOfRuinResult
  {
   double            risk_percent;
   double            edge;
   double            ror;
  };

#endif // RISKTYPES_MQH
//+------------------------------------------------------------------+