//+------------------------------------------------------------------+
//|                                                  SessionEnums.mqh|
//+------------------------------------------------------------------+
#ifndef SESSIONENUMS_MQH
#define SESSIONENUMS_MQH

//+------------------------------------------------------------------+
//| ENUM_TRADING_SESSION                                             |
//| Identifies one of the four trading sessions, or an unknown       |
//| fallback for deals that do not fall inside any configured        |
//| session boundary.                                                |
//+------------------------------------------------------------------+
enum ENUM_TRADING_SESSION
  {
   SESSION_SYDNEY = 0,
   SESSION_TOKYO,
   SESSION_LONDON,
   SESSION_NEW_YORK,
   SESSION_UNKNOWN
  };

//+------------------------------------------------------------------+
//| CSessionBoundary                                                 |
//| Describes one trading session's UTC open and close hour, its     |
//| display name, and the color used to draw a profitable bar for    |
//| that session.                                                    |
//+------------------------------------------------------------------+
struct CSessionBoundary
  {
   ENUM_TRADING_SESSION session_type;
   string               name;
   int                  utc_open_hour;
   int                  utc_close_hour;
   color                bar_color;
  };

//+------------------------------------------------------------------+
//| CSessionMetrics                                                  |
//| Holds the computed session metrics for one trading session:      |
//| trade count, win count, net P&L, and hold time totals.           |
//+------------------------------------------------------------------+
struct CSessionMetrics
  {
   ENUM_TRADING_SESSION session_type;
   string               name;
   int                  trade_count;
   int                  win_count;
   double               net_pnl;
   long                 total_hold_time;
   double               average_hold_time;
  };

//+------------------------------------------------------------------+
//| CDealRecord                                                      |
//| Holds the minimal fields read from one closed deal, including    |
//| the trading session it has been classified into.                 |
//+------------------------------------------------------------------+
struct CDealRecord
  {
   ulong                ticket;
   datetime             open_time;
   datetime             close_time;
   double               profit;
   string               symbol;
   ENUM_TRADING_SESSION session_type;
  };

#endif // SESSIONENUMS_MQH
//+------------------------------------------------------------------+