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

How to send alerts from Discord to MetaTrader 4/5

How to send alerts from MetaTrader 4/5 to Discord

How to send alerts from Telegram to MetaTrader 4/5

How to send alerts from MetaTrader 4/5 to Telegram

How to send alerts from TradingView to MetaTrader 4/5

  1. Download AdvancedNotificationsLib.dll into MQL4/Libraries or MQL5/Libraries folder.
  2. Modify your strategy code:

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