Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
For the Code provided by Camilo Maro to work. You need to create a Bot on Discord and check the Bot as an Administrator or check Sending or Receiving Messages

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I wanted to share a function I have developed to get the latest message from a Discord channel. It requires only the channel ID and the Discord Bot Token, and returns a string with the latest message in the chat. It can be combined with another function to send messages from an EA to Discord.
I wonder if among those of you that work on network connectivity can there be suggestions on how to improve it?. Currently, the problem I see is that it makes frequent requests to Discord by using "GET" in the WebRequest MQL5 function. It will be nice to have such functionality (Getting the latest message) via websocket, such that the connectivity with Discord is established only when a new message arrives; this will prevent wasting resources making calls to Discord during times when no new messages exist.