This is general-purpose article. You can use a more specific articles:

How to send alerts from MetaTrader 4/5 to Discord

How to send alerts from Discord to MetaTrader 4/5

How to send alerts from Telegram to MetaTrader 4/5

How to send alerts from MetaTrader 4/5 to Telegram

  1. Install Notifications Library using ProfitRobots installer.
  2. Modify your strategy code:

You can find a real-world example here: MT4 Engulfing Pattern with Telegram alerts