The forex EA for MT4 below, make it for MT5, to do exactly the same:                             //+------------------------------------------------------------------+
//|               Information EA-MT4.                                |
//|               Copyright of Taube Adrian.                         |
//|               Started- 19,August,2024.                           |
//|               Modified- 28,August,2024.                          |
//|               Further Modified- 25,September,2024.               |
//|               Further Modified- 02,October,2024.                 |
//+------------------------------------------------------------------+
#property strict

// External variables for customization
extern int textX = 10;                      // X position on chart
extern int textY = 10;                      // Y position on chart
extern int textSize = 12;                   // Text size
extern color textColor = White;             // Text color
extern int lineSpacing = 15;                // Spacing between lines
extern int timerInterval = 1;               // Timer interval in seconds

// Adding spaces to try to force line breaks in the input description
extern double equityChangeNotification = 500;  // Equity change(Up/Down)-Notification

// Variables to track maximum and minimum values
double maxDrawdown = 0;
double maxTemporaryProfit = 0;
double maxMargin = 0;
double maxEquity = 0;
double minEquity = 0;

// Variables for daily values
double dailyMaxDrawdown = 0;
double dailyMaxTemporaryProfit = 0;
double dailyMaxMargin = 0;
double dailyMaxEquity = 0;
double dailyMinEquity = 0;

// Variables to track equity changes for notifications
double initialEquity = 0;  // Track the starting equity when EA is installed

// Track the last known day to reset daily values after 12 AM broker time
datetime lastDay = 0;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   // Set the initial minEquity and daily values
   initialEquity = AccountEquity();
   minEquity = initialEquity;
   ResetDailyValues();

   // Create text objects on the chart
   CreateTextLabel("MaxDrawdown", "Maximum Account Drawdown = 0", textX, textY);
   CreateTextLabel("DailyMaxDrawdown", "TODAY Maximum Account Drawdown = 0", textX, textY + lineSpacing);

   CreateTextLabel("MaxTempProfit", "Maximum Account Temporary Profit = 0", textX, textY + 2 * lineSpacing);
   CreateTextLabel("DailyMaxTempProfit", "TODAY Maximum Account Temporary Profit = 0", textX, textY + 3 * lineSpacing);

   CreateTextLabel("MaxMargin", "Maximum Account Margin = 0", textX, textY + 4 * lineSpacing);
   CreateTextLabel("DailyMaxMargin", "TODAY Maximum Account Margin = 0", textX, textY + 5 * lineSpacing);

   CreateTextLabel("MaxEquity", "Maximum Account Equity = 0", textX, textY + 6 * lineSpacing);
   CreateTextLabel("DailyMaxEquity", "TODAY Maximum Account Equity = 0", textX, textY + 7 * lineSpacing);

   CreateTextLabel("MinEquity", "Minimum Account Equity = 0", textX, textY + 8 * lineSpacing);
   CreateTextLabel("DailyMinEquity", "TODAY Minimum Account Equity = 0", textX, textY + 9 * lineSpacing);

   // Set a timer for regular updates
   EventSetTimer(timerInterval);

   // Initialize the lastDay variable to the current day
   lastDay = TimeDay(TimeCurrent());

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   // Delete the text objects when EA is removed
   ObjectDelete("MaxDrawdown");
   ObjectDelete("DailyMaxDrawdown");
   ObjectDelete("MaxTempProfit");
   ObjectDelete("DailyMaxTempProfit");
   ObjectDelete("MaxMargin");
   ObjectDelete("DailyMaxMargin");
   ObjectDelete("MaxEquity");
   ObjectDelete("DailyMaxEquity");
   ObjectDelete("MinEquity");
   ObjectDelete("DailyMinEquity");

   // Kill the timer on deinitialization
   EventKillTimer();
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   static datetime lastTickTime = 0;
   if (TimeCurrent() - lastTickTime >= timerInterval)
     {
      UpdateAccountInfo();
      lastTickTime = TimeCurrent();
     }

   // Check for equity change notification based on account currency
   double currentEquity = AccountEquity();
   double equityChange = currentEquity - initialEquity;
   
   // Send a notification if the equity change exceeds the threshold (positive or negative)
   if (MathAbs(equityChange) >= equityChangeNotification)
     {
      // Determine if equity increased or decreased
      string changeDirection = (equityChange > 0) ? "UP" : "DOWN";
      
      // Get broker name and account type (LIVE=REAL or DEMO)
      string brokerName = AccountInfoString(ACCOUNT_COMPANY);
      string accountType = (AccountInfoInteger(ACCOUNT_TRADE_MODE) == ACCOUNT_TRADE_MODE_DEMO) 
                           ? "DEMO" 
                           : "LIVE=REAL";

      // Send notification
      string message = StringFormat(
          "Equity %s by %.2f %s.\n"                // Line 1: Equity change (UP or DOWN)
          "Current Equity=%.2f %s.\n"              // Line 2: Current equity
          "Broker: %s.\n"                          // Line 3: Broker name
          "Account: %s.",                          // Line 4: Account type (LIVE=REAL or DEMO)
          changeDirection,                         // Equity direction (UP or DOWN)
          MathAbs(equityChange),                   // Absolute value of equity change
          AccountCurrency(),                       // Currency (e.g., USD)
          currentEquity,                           // Current equity value
          AccountCurrency(),                       // Currency (e.g., USD)
          brokerName,                              // Broker name
          accountType                              // Account type (LIVE=REAL or DEMO)
      );
      SendNotification(message);

      // Reset the initial equity to the current equity for tracking further changes
      initialEquity = currentEquity;
     }

   // Reset daily values after 12 AM broker time
   CheckAndResetDailyValues();
  }
//+------------------------------------------------------------------+
//| Timer function for regular updates                               |
//+------------------------------------------------------------------+
void OnTimer()
  {
   UpdateAccountInfo();
  }
//+------------------------------------------------------------------+
//| Function to update account info and text labels                  |
//+------------------------------------------------------------------+
void UpdateAccountInfo()
  {
   // Get the account currency symbol
   string currencySymbol = AccountCurrency();

   // Get current account values
   double equity = AccountEquity();
   double balance = AccountBalance();
   double margin = AccountMargin();
   
   // Update maximum and minimum values
   double drawdownCurrency = balance - equity;
   double drawdownPercent = (drawdownCurrency / balance) * 100.0;
   if (drawdownCurrency > maxDrawdown)
      maxDrawdown = drawdownCurrency;

   if (equity > maxEquity)
      maxEquity = equity;
   
   if (equity < minEquity)
      minEquity = equity;

   double tempProfitCurrency = equity - balance;
   double tempProfitPercent = (tempProfitCurrency / balance) * 100.0;
   if (tempProfitCurrency > maxTemporaryProfit)
      maxTemporaryProfit = tempProfitCurrency;

   if (margin > maxMargin)
      maxMargin = margin;

   // Daily values
   if (drawdownCurrency > dailyMaxDrawdown)
      dailyMaxDrawdown = drawdownCurrency;

   if (equity > dailyMaxEquity)
      dailyMaxEquity = equity;

   if (equity < dailyMinEquity)
      dailyMinEquity = equity;

   if (tempProfitCurrency > dailyMaxTemporaryProfit)
      dailyMaxTemporaryProfit = tempProfitCurrency;

   if (margin > dailyMaxMargin)
      dailyMaxMargin = margin;

   // Calculate percentage values for display
   double maxMarginPercent = (maxMargin / balance) * 100.0;
   double maxEquityPercent = (maxEquity / balance) * 100.0;
   double minEquityPercent = (minEquity / balance) * 100.0;

   // Update text labels with currency symbol
   ObjectSetText("MaxDrawdown", StringFormat("Maximum Account Drawdown = %.2f %s (%.2f%% of Balance)", maxDrawdown, currencySymbol, drawdownPercent), textSize, "Arial", textColor);
   ObjectSetText("DailyMaxDrawdown", StringFormat("TODAY Maximum Account Drawdown = %.2f %s", dailyMaxDrawdown, currencySymbol), textSize, "Arial", textColor);
   
   string tempProfitText = (maxTemporaryProfit > 0) 
      ? StringFormat("Maximum Account Temporary Profit = %.2f %s (%.2f%% of Balance)", maxTemporaryProfit, currencySymbol, tempProfitPercent)
      : StringFormat("Maximum Account Temporary Profit = %.2f %s", maxTemporaryProfit, currencySymbol);
   
   ObjectSetText("MaxTempProfit", tempProfitText, textSize, "Arial", textColor);
   ObjectSetText("DailyMaxTempProfit", StringFormat("TODAY Maximum Account Temporary Profit = %.2f %s", dailyMaxTemporaryProfit, currencySymbol), textSize, "Arial", textColor);
   
   ObjectSetText("MaxMargin", StringFormat("Maximum Account Margin = %.2f %s (%.2f%% of Balance)", maxMargin, currencySymbol, maxMarginPercent), textSize, "Arial", textColor);
   ObjectSetText("DailyMaxMargin", StringFormat("TODAY Maximum Account Margin = %.2f %s", dailyMaxMargin, currencySymbol), textSize, "Arial", textColor);
   
   ObjectSetText("MaxEquity", StringFormat("Maximum Account Equity = %.2f %s (%.2f%% of Balance)", maxEquity, currencySymbol, maxEquityPercent), textSize, "Arial", textColor);
   ObjectSetText("DailyMaxEquity", StringFormat("TODAY Maximum Account Equity = %.2f %s", dailyMaxEquity, currencySymbol), textSize, "Arial", textColor);
   
   ObjectSetText("MinEquity", StringFormat("Minimum Account Equity = %.2f %s (%.2f%% of Balance)", minEquity, currencySymbol, minEquityPercent), textSize, "Arial", textColor);
   ObjectSetText("DailyMinEquity", StringFormat("TODAY Minimum Account Equity = %.2f %s", dailyMinEquity, currencySymbol), textSize, "Arial", textColor);
  }
//+------------------------------------------------------------------+
//| Function to reset daily values                                   |
//+------------------------------------------------------------------+
void ResetDailyValues()
  {
   dailyMaxDrawdown = 0;
   dailyMaxTemporaryProfit = 0;
   dailyMaxMargin = 0;
   dailyMaxEquity = AccountEquity();
   dailyMinEquity = AccountEquity();
  }
//+------------------------------------------------------------------+
//| Function to create or update text label on the chart             |
//+------------------------------------------------------------------+
void CreateTextLabel(string name, string text, int x, int y)
  {
   if (ObjectFind(0, name) < 0)
     {
      ObjectCreate(0, name, OBJ_LABEL, 0, 0, 0);
      ObjectSetInteger(0, name, OBJPROP_CORNER, CORNER_LEFT_UPPER);
      ObjectSetInteger(0, name, OBJPROP_XDISTANCE, x);
      ObjectSetInteger(0, name, OBJPROP_YDISTANCE, y);
      ObjectSetInteger(0, name, OBJPROP_COLOR, textColor);
      ObjectSetInteger(0, name, OBJPROP_FONTSIZE, textSize);
     }
   ObjectSetString(0, name, OBJPROP_TEXT, text);
  }
//+------------------------------------------------------------------+
//| Function to check and reset daily values at 12 AM                |
//+------------------------------------------------------------------+
void CheckAndResetDailyValues()
  {
   datetime currentTime = TimeCurrent();
   int currentDay = TimeDay(currentTime);

   // If the day has changed (i.e., it's a new day), reset daily values
   if (currentDay != lastDay)
     {
      ResetDailyValues();
      lastDay = currentDay;
     }
  }
//+------------------------------------------------------------------+