How to send HTTP POST request to MT4 EA

 

Hello,

Is there a way to set up a receive endpoint within an MT4 EA? The goal is to be able to send HTTP POST requests via REST API. I am aware of the WebRequest feature but this can be used only for outbound requests. I am interested in inbound requests.

Big thanks in advance,

Robert

 
you need to create your own webhost and make your own rest api by any backend language like PHP or nodejs  then to make the EA to get data from it normally . But what is the purpose?  I think you want to control your EA from external source ?!!!! 
 
Interesting . 
I had attempted something similar with IFTT webhooks (if this then that)
Whatever the case the EA will need to ping something constantly , whether its a server , a folder in localhost or a telegram bot.
Try that first as with telegram bots your ea essentially becomes the "server" for that bot .
Now on scalability you would need to have that bot write on a public channel , then have the public channel scrapped (as bots cant read or talk to bots)
etc...
[scalability is problematic with this method because an instance of your bot running on someother users mt4 will pull messages intended for another user and render them "marked as read" and unavailable to other instances.But , if you want to control one ea or one indy ,essentially one mt4 = one telegram bot ,then its a viable and simple solution]
 
Robert Maidla:

Hello,

Is there a way to set up a receive endpoint within an MT4 EA? The goal is to be able to send HTTP POST requests via REST API. I am aware of the WebRequest feature but this can be used only for outbound requests. I am interested in inbound requests.

Big thanks in advance,

Robert

It's a very bad idea. Even if you succeed to do it, which is far from trivial, do you really want to allow incoming connection to your MT4, trading with your money (or the money of others). That's insane.
Reason: