
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 created a simple function that sends a message do Discord from any MQL5 EA, I hope it can be useful to others. Now I want to create an EA that reads that message from Discord.
While reading about this, I found that one can use the GET function as a WebRequest, which can be implemented in the OnTimer in the EA. Basically, every given time interval the EA ask Discord if any new message arrived. This is obviously not efficient because most times there will not be a message. The best alternative is a websocket, in which Discord creates a connection with MQL5 and sends the message only when one arrives to discord. But this is also implemented in the OnTimer part of the EA.. so it seems one is ultimately always calling Discord... is there any difference between GET and the Websocket, when they are both triggered at the same time intervals of the OnTimer?.
Has anyone established a websocket or GET connection with Discord?